send data to excel from c#
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 |
send data to excel from c#
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. " wrote: 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 |
All times are GMT +1. The time now is 07:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com