We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

send as email attachment

Thread ID:

Created:

Updated:

Platform:

Replies:

56752 Feb 20,2007 03:29 PM UTC Feb 22,2007 02:05 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: XlsIO
Nipun Tamrakar
Asked On February 20, 2007 03:29 PM UTC

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 ?

Melba Winshia [Syncfusion]
Replied On 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

Nipun Tamrakar
Replied On February 22, 2007 07:50 AM UTC

Hello Melba,

Thanks a lot. This was very helpful.

Melba Winshia [Syncfusion]
Replied On February 22, 2007 02:05 PM UTC

Hi Nipun,

Thanks for the update!

Kindly let me know if you have any other questions.

Regards,
Melba

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;