[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Excel Interop with in-memory document - no file system

mj2736

6/29/2007 2:35:00 PM

I have Excel 2003 documents stored in a SQL 2005 database,
VARBINARY(MAX) column. I need to read the documents out of the table,
open them up, modify their header, and write them back to another
table. In .Net 2.0 is it possible to do all of this in memory using
the Excel interop interface, without writing the documents to the file
system? Thanks.

1 Answer

NickHK

7/3/2007 6:21:00 AM

0

Depends what you mean by "modify their header" ?
If you understand the binary format of the Excel file then yes anything is
possible, maybe using one of the BIFF Reader/Writer classes available as a
starting point.
Otherwise (and IMHO certainly the easier) is to use automation/interop and
allow Excel to make the changes, which will involve writing the file to disk
somewhere, then use Workbooks.Open

NickHK

<mj2736@yahoo.com> wrote in message
news:1183127671.356028.272760@n60g2000hse.googlegroups.com...
> I have Excel 2003 documents stored in a SQL 2005 database,
> VARBINARY(MAX) column. I need to read the documents out of the table,
> open them up, modify their header, and write them back to another
> table. In .Net 2.0 is it possible to do all of this in memory using
> the Excel interop interface, without writing the documents to the file
> system? Thanks.
>