Skip to content

Commit 4ddb30e

Browse files
authored
Merge pull request #1872 from syncfusion-content/995470-ModifyAwsLambdaUG
995470-Modify AWS Lambda code snippet in XlsIO getting started page
2 parents 8cf6d06 + 196ca85 commit 4ddb30e

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Document-Processing/Excel/Excel-Library/NET/create-read-edit-excel-files-in-aws-lambda.md

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

0 commit comments

Comments
 (0)