File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Document-Processing/Excel/Excel-Library/NET Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -222,17 +222,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
222222 worksheet.Range[ "A9: A14 "] .RowHeight = 15;
223223 worksheet.Range[ "A15: A23 "] .RowHeight = 18;
224224
225- //Saving the Excel to the MemoryStream
226- MemoryStream stream = new MemoryStream();
225+ MemoryStream stream = new MemoryStream();
227226 workbook.SaveAs(stream);
228-
229- //Set the position as '0'.
230- stream.Position = 0;
231-
232- //Download the Excel file in the browser
233- FileStreamResult fileStreamResult = new FileStreamResult(stream, "application/excel");
234- fileStreamResult.FileDownloadName = "Output.xlsx";
235- return fileStreamResult;
227+ return Convert.ToBase64String(stream.ToArray());
236228}
237229
238230{% endhighlight %}
You can’t perform that action at this time.
0 commit comments