Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code to export data to Excel..

Status
Not open for further replies.

bouser1

Programmer
Joined
Dec 11, 2002
Messages
1
Location
US
Hi guys,
I worte a macro to refresh a report by passing values and save them as pdf files and now the user wants data in excel sheet to work on.

This is my macro for saving pdf.

Set doc = Application.Documents.Open("C:\R-20-##-###-CY2002.rep")
Set var = doc.Variables.Item(1)
Set var1 =doc.Variables.Item(2)
var.Value = dotcntycd
var1.Value = wislrcmtycd

Application.Interactive = False 'Turns off all warnings.
doc.Refresh
Application.Interactive = True 'Turns on all warning.
strfile1 = ""
strfile1 = "C:\R-20-" & dotcntycd & "-" & wislrcmtycd & "-CY2002.pdf"
strfile1 = CStr(strfile1)
doc.SaveAs strfile1
doc.Close

Now I need to add some code after refresh and before i close the document. So that i export data from the cube!! Please let me know.

Thanks
Mat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top