Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Black_Hole
Creator II
Creator II

Export to CSV

Hello all,

I have a macro to allow me to export a table from QlikView to Excel with CSV format.

But, my macro works only  if I precise the destination path of my table.

The purpose is that this macro can be run by any user. So, I would like to remove the path.

That's mean, my macro shall to export with CSV format without saving the file in a specific path.

Please could you tell me if it's possible to do that in QlikView.

Below the detail of my current macro:

sub ExportCSV


set obj = ActiveDocument.GetSheetObject("TB09")


obj.Export "C:\Users\JUTD5420\Desktop\Sales_102019.csv" , ";"

msgbox("Done")

end sub

Thank you in advance for your help.

Labels (1)
2 Replies
Stoyan_Terziev
Partner - Creator III
Partner - Creator III

Hello Black Hole,

 

In general what you are asking unfortunately cannot be achieved with QlikView.

However if the users and the Qlik server are all in one network and the QlikView service has accesses to personal designated directories, you can use dynamic location for this section:

obj.Export "C:\Users\JUTD5420\Desktop\Sales_102019.csv" , ";"

 

obj.Export "C:\$(UserNamePersonalLocation)\JUTD5420\Desktop\Sales_102019.csv" , ";"

 

I hope that helps!

 

Kind regards,

S.T.

Brett_Bleess
Former Employee
Former Employee

Another possibility that may work along Stoyan's line of thinking would be to use a UNC path to a file server to which all the users have access and then use the OSUser() function to append the user folder to the path etc....

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.