The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello, I want to send the generated workseet as an email attachment. But I dont want to save the file in the server before attaching in the mail. Is there any way i can chance the worksheet object in an array of byte()?
I have three servers in the server farm with load sharing services in the farm. Does saving the file in server affect in any way while retrieving the file in such scenarios ?
MWMelba Winshia Syncfusion Team February 21, 2007 02:03 PM UTC
Hi Nipun,
1) You can get the worksheet object in an array of byte[] by using the using the following code snippet.
[c#]
// Creating a memory Stream. MemoryStream ms = new MemoryStream();
// Save the xls file to the Stream. workbook.SaveAs(ms);
// Get the worksheet object in an array of byte[] byte[] aPdfDocByteArray = new Byte[ms.Length]; ms.Read(aPdfDocByteArray, 0, System.Convert.ToInt32(ms.Length)); ms.Seek(0, SeekOrigin.Begin);
2) No, saving the file in server will not affect in any way while retrieving the file in such scenarios.
Kindly let me know if you have any other questions.
Thanks, Melba
NTNipun TamrakarFebruary 22, 2007 07:50 AM UTC
Hello Melba,
Thanks a lot. This was very helpful.
MWMelba Winshia Syncfusion Team February 22, 2007 02:05 PM UTC
Hi Nipun,
Thanks for the update!
Kindly let me know if you have any other questions.