Skip to main content
Announcements
Qlik Announces Qlik Talend Cloud and Qlik Answers: LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
riishabhz
Creator
Creator

button export to excel

hello

my boss said that after clicking the button it should be saved to excel but only at desired location.

for example pop up box will open and will ask for desired path for save.

right now my script is this and saving at only d location but now i want a pop up to ask where to save.

:-

SUB EXPORT
set sObject1 = ActiveDocument.GetSheetObject("TB02")
sObject1.Export "D:\MyDoc.csv", ", "
end sub

 

1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

did you try my code above?

It is asking for the path!!

As long as you enter a valid path the macro will save the csv to the desired path!

 

 

View solution in original post

3 Replies
Frank_Hartmann
Master II
Master II

SUB EXPORT
ask_safe = Inputbox("Please insert save-path") 'e.g. C:\Users\admin\Desktop\test.csv
msgbox(ask_safe)
set sObject1 = ActiveDocument.GetSheetObject("TB01")
sObject1.Export ask_safe, ", "
end sub

riishabhz
Creator
Creator
Author

sir is there any option where window is pop up and ask user for path i mean without hard coding this.

like first i want to save in d drive

next time i want to save in e drive

can this be done without hard code part

Frank_Hartmann
Master II
Master II

did you try my code above?

It is asking for the path!!

As long as you enter a valid path the macro will save the csv to the desired path!