Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
rafael5958
Creator
Creator

script to automatcally generate csv

Hi, I have an app like in the example, what do I need is a macro/script so I can press a button and automatcally export a table in csv files by month-year. (01/2019, 02/2019, 03/2019.....).

 

Is it possible to do ?

Labels (2)
1 Solution
6 Replies
NadiaB
Support
Support

Hi @rafael5958 

Is there any specific reason that you want an extra button? You can use the "Export" option from the Access Point that will generate a CSV file for any object.

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Export.htm

 

Kind regards.

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
rafael5958
Creator
Creator
Author

No, the button is optional, but I do need to run over all month and years and generate a cvs to each one. I got this so far, but its not working ....

sub aa
set table = ActiveDocument.GetSheetObject( "CH01" )

for RowIter = 1 to table.GetRowCount-1
 set cell = table.GetCell(RowIter,2)
set sObject = ActiveDocument.GetSheetObject("TB01")
sObject.Export "d:\"+table.GetCell(RowIter,0).text+"-"+table.GetCell(RowIter,1).text+".csv", ", "

next

end sub
NadiaB
Support
Support

Hi @rafael5958 

It will be easier to create the object, you just need to create the appropriate expressions.

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm
rafael5958
Creator
Creator
Author

Could give me a sample? I still didnt get it. lm not an experient qlikview user.

NadiaB
Support
Support

hi @rafael5958 

Could you provide an example of the output you are trying to accomplish?

 

Thank you .

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm