Hi
So far I managed to write a .vbs that opens the crystal report. I am using Crystal Reports Viewer 2008.
'Code Starts
Option Explicit
Dim oRpt, oApp, x
Set oApp = Wscript.CreateObject("Wscript.Shell")
oRpt = "C:\Program Files\Crystal Reports Viewer 2008"
x=Chr(34) & "C:\Documents and Settings\tazz\Desktop\strat.rpt" & Chr(34)
oApp.Run Chr(34) & oRpt & "\CrystalReportsViewer.exe" & Chr(34) & x, 0, "FALSE"
'Code Ends
The above .vbs, when run from cmd prompt, manages to open the .rpt file using crystal reports viewer 2008. After opening .rpt file, I am manually exporting to Excel. I want to implement the exporting to excel part, in my above .vbs code. I know there are some .exportexcel options or something of this sort. I am not sure how to do that, any help/ code would be great for me.
My objective : I have .rpt file as an input. I simply want to convert it to a .xls file with retaining format of crystal report. (Just like manually opening a crystal report, exporting to excel 97-2003 and selecting 'OK' when the excel format dialog box pops up)
Waiting for some kind souls out there to help!