File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
Document-Processing/Excel/Conversions/Excel-to-HTML Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
3535 worksheet.SaveAsHtml(stream);
3636
3737 //Save a workbook as HTML file
38- workbook.SaveAsHtml(stream , Syncfusion.XlsIO.Implementation.HtmlSaveOptions.Default);
38+ workbook.SaveAsHtml("Sample.html" , Syncfusion.XlsIO.Implementation.HtmlSaveOptions.Default);
3939 stream.Dispose();
4040 workbook.Close();
4141}
@@ -97,12 +97,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
9797
9898 #region Save as HTML
9999 //Saving the workbook
100- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.html"), FileMode.Create, FileAccess.Write);
101- workbook.SaveAsHtml(outputStream, saveOptions);
100+ workbook.SaveAsHtml(Path.GetFullPath("Output/Output.html"), saveOptions);
102101 #endregion
103-
104- //Dispose streams
105- outputStream.Dispose();
106102}
107103{% endhighlight %}
108104
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
3535 worksheet.SaveAsHtml(stream);
3636
3737 //Save a workbook as HTML file
38- workbook.SaveAsHtml(stream , Syncfusion.XlsIO.Implementation.HtmlSaveOptions.Default);
38+ workbook.SaveAsHtml("Sample.html" , Syncfusion.XlsIO.Implementation.HtmlSaveOptions.Default);
3939 stream.Dispose();
4040 workbook.Close();
4141}
@@ -97,12 +97,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
9797
9898 #region Save as HTML
9999 //Saving the workbook
100- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.html"), FileMode.Create, FileAccess.Write);
101- workbook.SaveAsHtml(outputStream, saveOptions);
100+ workbook.SaveAsHtml(Path.GetFullPath("Output/Output.html"), saveOptions);
102101 #endregion
103-
104- //Dispose streams
105- outputStream.Dispose();
106102}
107103{% endhighlight %}
108104
You can’t perform that action at this time.
0 commit comments