Skip to content

Commit cd20e8e

Browse files
990137-ExcelToHtmlUG
1 parent f2bf254 commit cd20e8e

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

Document-Processing/Excel/Conversions/Excel-to-HTML/NET/Excel-to-HTML-Conversion.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff 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

Document-Processing/Excel/Conversions/Excel-to-HTML/overview.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)