File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Document-Processing/Excel/Conversions/Chart-to-Image Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
2828 //Set converter chart image format to PNG
2929 application.XlsIORenderer.ChartRenderingOptions.ImageFormat = ExportImageFormat.Png;
3030
31- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
32- IWorkbook workbook = application.Workbooks.Open(inputStream);
31+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
3332 IWorksheet worksheet = workbook.Worksheets[0];
3433
3534 IChart chart = worksheet.Charts[0];
@@ -42,7 +41,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
4241
4342 //Dispose streams
4443 outputStream.Dispose();
45- inputStream.Dispose();
4644}
4745{% endhighlight %}
4846
You can’t perform that action at this time.
0 commit comments