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: 
Not applicable

Export to CSV

Hi everyone!!

Today i'm trying to export some straight table to CSV file.

I read some discussion here or in other forums, and all suggested to use macro.

I did some tests following their suggestions, but in any case I've found a method that works.

Can someone explain the correct way to export one or more tables in a csv file ??

Thanks

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Try this simple macro:

sub exportcsv

set sObject = ActiveDocument.GetSheetObject("CH04")

sObject.Export "c:\myfile.csv", ", "

end sub

where CH04 is the table you want to export

View solution in original post

6 Replies
DavidFoster1
Specialist
Specialist

One of the options on the STORE command is CSV.

STORE <table> INTO C:\temp\table.csv (CSV);

alexandros17
Partner - Champion III
Partner - Champion III

Try this simple macro:

sub exportcsv

set sObject = ActiveDocument.GetSheetObject("CH04")

sObject.Export "c:\myfile.csv", ", "

end sub

where CH04 is the table you want to export

jagan
Luminary Alumni
Luminary Alumni

Hi,

You need to use macro to export chart data to CSV or export the chart to excel and click Save As and select file type as CSV.

SUB ExportChartToCSV

     SET  objChart = ActiveDocument.GetSheetObject("CH01")

     objChart.Export "C:\Data.CSV", ", "

END SUB

Regards,

Jagan.

ngulliver
Partner - Specialist III
Partner - Specialist III

Hi, David.

Just a minor correction. I think it should be:

STORE <table> INTO C:\temp\table.csv (txt);


Cheers,

Neil

deepakqlikview_123
Specialist
Specialist

Hi Jagan,

How to export chart data to csv for more than one chart.

Thanks

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

SUB ExportChartToCSV

     SET  objChart = ActiveDocument.GetSheetObject("CH01")

     objChart.Export "C:\Data1.CSV", ", "

SET  objChart = ActiveDocument.GetSheetObject("CH02")

     objChart.Export "C:\Data2.CSV", ", "

SET  objChart = ActiveDocument.GetSheetObject("CH03")

     objChart.Export "C:\Data3.CSV", ", "

END SUB


Note : One CSV file can hold only one table data.


Hope this help syou.


Regards,

Jagan.