Run schedule task in server without Excel and Crystal report being installed

aspfun

Active member
Joined
Feb 16, 2010
Messages
34
Programming Experience
5-10
I created a Windows desktop app to export Excel and Crystal Report to a file server.
It works fine in my pc (win7, vs2010) but once I move exe file to one server and set up a schedule task to run exe file, it failed to run.
I found out that this server do not install Excel and Crystal report.
Is it the reason of failing to run? How to fix it?
 
Noone is going to install Excel on a server. You're going to need to implement an export routine that doesn't require Excel. If you must export XLS then that means buying a third-party component that supports it, or I believe that you can acually distribute the Office runtime with your app but there is a license fee involved. Otherwise, you can export to CSV, which is just plain text but will open in Excel by default, or you can use the OpenXML SDK to export to XLSX format, which can only be opened in Excel 2007 or later, although I believe that there's an add-in for Excel 2003 that will allow reading of XLSX files but not writing. As for Crystal Reports, I've never actually used it so I'm not sure of all the details but you may be able to distribute the required components with your app. If not then, again, you'll have to either get the administrator to install the required components on the server or stop using CR.
 
Back
Top