Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.Runtime.InteropServices.COMException problem

Status
Not open for further replies.

clyde11

Programmer
Feb 6, 2006
25
GB
Hi all,
I'm developing a web application and using OWC10
(office web component), i've added the relevant COM component (OWC10) into my project, and it works just fine on my local machine,
when i put it on some server
and running the application an exception is raised
due to the
"xlsheet.Export( path, o1, o2);"
command in the last line, with this exception:

"System.Runtime.InteropServices.COMException (0xE004002A): Exception from HRESULT: 0xE004002A. at OWC10.SpreadsheetClass.Export(String Filename, SheetExportActionEnum Action, SheetExportFormat Format) at qsc.WebForm1.ExportDataGridToExcel(String command, String filename) in c:\inetpub\ 1137"




code:

OWC10.SpreadsheetClass xlsheet =
new OWC10.SpreadsheetClass();

string path = Server.MapPath(".")+"\\"+xlFileName;

OWC10.SheetExportActionEnum o1 = OWC10.SheetExportActionEnum.ssExportActionNone;

OWC10.SheetExportFormat o2 = OWC10.SheetExportFormat.ssExportHTML;

xlsheet.Export( path, o1, o2); //problematic command...


if anyone knows the trick...
Best, P.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top