c# - Alternatives to Excel Interop SaveAs() method -


we using excel interop create excel reports in windows service. works fine in windows 7 os. when service deployed in win2k8r2 server, observed following exception thrown while saving excel document using "saveas()" method.

exception - hresult: 0x800a03ec

after researching got know that, need use "savecopyas()" or use "close()" instead of saveas() method. tried using "savecopyas()" method , found out excel report creation works fine "excel.exe" in task manager remains. memory leak problem.

hence used "close(true, filename, false)" method , works fine, includes clearing "excel.exe" process in task manager.

a common mechanism considered disposing com objects, assigning objects null after usage both scenarios tested.

now, i'm confused right approach take forward. please clarify.

look @ open xml sdk
microsoft not recommend office interopt server automation

how to: create spreadsheet document providing file name (open xml sdk)

there commercial packages aspose

and free packages such epplus.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -