Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Write Worksheet to MemoryStream in .NET 2.0

I am developing a windows forms application in .NET 2.0 using VS2005.

One of my forms has a grid that I want to convert to Excel and attach
to an email and send using System.Net.Mail.

..NET 2.0 has a MemoryStream class that can be attached to an email.

mail.Attachments.Add(New Attachment(attachmentStream1, "ExcelFile.xls",
"excel/xlsss"))

Using Excel Automation, I have created a Workbook. I can save the
workbook to disk, but I want to write it to the MemoryStream object to
use as the attachmentStream.

How can I get the Worksheet into to MemoryStream?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Write Unique Values to New Worksheet John_Carty Excel Programming 1 November 2nd 05 01:07 PM
Write to One Worksheet Only ? MAS Excel Programming 1 May 25th 05 08:01 PM
ComboBox Issue: Write to WorkSheet Paul Martin Excel Programming 2 May 17th 05 05:53 AM
IF then write new worksheet/book Don Hansford[_2_] Excel Programming 0 April 2nd 04 04:24 PM
Why Can't Unprotect and write value into worksheet before close. EdgeOfCity Excel Programming 2 November 19th 03 02:14 PM


All times are GMT +1. The time now is 07:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"