Использование EXCEL в .NET
От: stan_knyazev  
Дата: 02.01.03 11:30
Оценка:
Использую вывод данных в EXCEL :

using Excel;
...
private Excel.ApplicationClass app = new Excel.ApplicationClass();
....
Excel._Workbook wb= (Excel._Workbook) app.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);
Worksheet ws=(Worksheet)wb.Worksheets[1];
app.Quit();



При публикации странички локально все работает

При публикации на сервере — выпадает ошибка —

Old format or invalid type library.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Old format or invalid type library.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[COMException (0x80028018): Old format or invalid type library.]
Excel.Workbooks.Add(Object Template) +0
clsDocuments.dgDocuments_ItemCommand(Object sender, DataGridCommandEventArgs e) in e:\maintenance\work\documents.aspx.cs:283



Я доковырял что проблема с регистрацией обертки на сервере так как референс добавляю на локальной машине а публикую на сервере, если кто сталкивался с такой проблемой подскажите как зарегистрировать обертку на сервере

Заранее спасибо !
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.