Export Report to Excel without saving it

johncassell

Well-known member
Joined
Jun 10, 2007
Messages
120
Location
Redcar, England
Programming Experience
Beginner
Hi There,

I have a standard report (not crystal) which loads fine and at the top it comes with the standard buttons at the top of the ReportViewer.

There is a button to export this to excel (looks like a save icon).

Fine, but I want the report to shoot straight to Excel without having to save it somewhere first.

Can someone tell me how to achieve this please?

Thanks

John
 
you would need to open Excel in your app which can be done using the Office Interop Assemblies in which you leave Excel open when you're done.

Office XP/2002: http://www.microsoft.com/downloads/...1E-3060-4F71-A6B4-01FEBA508E52&displaylang=en
Office 2003: http://www.microsoft.com/downloads/...3a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en
Office 2007: http://www.microsoft.com/downloads/...AA-BED4-4282-A28C-B864D8BFA513&displaylang=en


personally I would make a quick CSV file in the uer's temp directory then use System.Diagnostics.Process.Start("Your CSV file here") then delete the csv file when the program closes
 
Back
Top