From 196ca8551587d7b000a00afa471b2c6207c01bdc Mon Sep 17 00:00:00 2001 From: KarthikaSF4773 Date: Thu, 27 Nov 2025 19:16:39 +0530 Subject: [PATCH] 995470-ModifyAwsLambdaUG --- .../create-read-edit-excel-files-in-aws-lambda.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Document-Processing/Excel/Excel-Library/NET/create-read-edit-excel-files-in-aws-lambda.md b/Document-Processing/Excel/Excel-Library/NET/create-read-edit-excel-files-in-aws-lambda.md index 26a5cafae..ebe6e825f 100644 --- a/Document-Processing/Excel/Excel-Library/NET/create-read-edit-excel-files-in-aws-lambda.md +++ b/Document-Processing/Excel/Excel-Library/NET/create-read-edit-excel-files-in-aws-lambda.md @@ -222,17 +222,9 @@ using (ExcelEngine excelEngine = new ExcelEngine()) worksheet.Range["A9:A14"].RowHeight = 15; worksheet.Range["A15:A23"].RowHeight = 18; - //Saving the Excel to the MemoryStream - MemoryStream stream = new MemoryStream(); + MemoryStream stream = new MemoryStream(); workbook.SaveAs(stream); - - //Set the position as '0'. - stream.Position = 0; - - //Download the Excel file in the browser - FileStreamResult fileStreamResult = new FileStreamResult(stream, "application/excel"); - fileStreamResult.FileDownloadName = "Output.xlsx"; - return fileStreamResult; + return Convert.ToBase64String(stream.ToArray()); } {% endhighlight %}