ZZhang

Hi, all,

I need to have a scheduled job (.exe file) to automatically create a excel report everyday. The report has three sheets, and data is from sql server.

Is VSTO the right tool and how

Thank you!

-Z



Re: Visual Studio Tools for Office create scheduled excel report

Cindy Meister

No VSTO would not be the right tool for such a project. VSTO does not create *.exe files. VSTO is aimed more at projects that involve user interaction. It creates either COM Add-ins (that run when the Office application runs) or document/template projects with code linked specifically to that file (replaces embedded VBA).

From the sound of it, your report creation should run unattended In that case, I recommend you consider using the OpenXML file format to generate the report. This will allow you to create a report using XML, rather than automating the Excel application. Your app could run on a (web) server, even.

Note that the file format for OpenXML is targeted at office 2007. BUT all versions of Excel back to 2000 should be able to open and read a workbook in that file format, as long as they've installed all update packages. The converter for this file format is part of the update packages.






Re: Visual Studio Tools for Office create scheduled excel report

Dennis Wallentin

Hi,


I agree with Cindy and You can check out the ExcelPackage if You want to create server side reports for Excel.






Re: Visual Studio Tools for Office create scheduled excel report

ZZhang

Hi, Cindy & Dennis,

Thank you very much for your suggestions!

Several years ago, I used Access report( or CrystalReport), and VB6 to export the report as excel file. It worked, but only for one sheet per excel file.

Thanks again!

-Z