Skip to content

Commit 122edac

Browse files
990137-ChartToImageUG
1 parent 84cf79f commit 122edac

File tree

1 file changed

+1
-3
lines changed
  • Document-Processing/Excel/Conversions/Chart-to-Image

1 file changed

+1
-3
lines changed

Document-Processing/Excel/Conversions/Chart-to-Image/overview.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)