send data to excel from c#

C

chwe.at

hi.
situation:
I have an ASP.net 2.0 (c#) web-application which writes an ID into an
excel document and lets the user download it. this is done with VSTO by
opening the excel-document with
Excel.Application app = new Excel.ApplicationClass();
Excel.Workbook wb = app.Workbooks.Open(filename, missing, missing,
missing, missing,
missing, missing, missing, missing, missing, missing, missing,
missing, missing, missing);

After this I write a CustomProperty where I save the GUID.
Nearly everything works fine but my problem is, that sometimes, when
something crashes, the process EXCEL.EXE doesn't go away or some other
strange things happen. Moreover this way is deprecated by Microsoft!

so i am searching for a way to send data to excel in a different way
from the server-side. It doesn't have to be a CustomProperty! It would
be enough if i could write to a column!! Best would be, if it's not
even necessary to have Excel installed on the server.

awaiting your suggestions,
cribe
 
G

Guest

I have been wondering the same thing. As a quick solution I have been using
the clipboard as a way to communication between my two applications. While
working in excel my vba will call (start) my vb.net application which will
then respond by posting to the clipboard. My vba then consumes the
information.

I'm sure there is a better way to do this, but this method works for now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top