Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
kvijay173
New Contributor III

Export to Excel / CSV as multiple files

Capture.PNG

Friends,

I have a pivot table chart object as above. When I export to this to excel. I am able to get the export as one file. Is there any way to use a macro or something to perform a click which will split this to 3 files based on the Country and save it to a location.?

Tags (2)
4 Replies

Re: Export to Excel / CSV as multiple files

Look here for some ideas:

www.qlikblog.at/971/qliktip-32-exporting-multiple-objects-single-excel-document/

kvijay173
New Contributor III

Re: Export to Excel / CSV as multiple files

Thanks Rob, Let me try and will get back to you. it is a nice link.

kvijay173
New Contributor III

Re: Export to Excel / CSV as multiple files

Hi Rob

I am getting error like below. What should I do.

My object ID is 25 so I tried below and when tried to run the macro...

Error: Type mismatch: 'copyObjectsToExcelSheet'

Code used:

Dim aryExport(25,3)

aryExport(25,0) = "objSalesPerYearAndRegion"

aryExport(25,1) = "Sales"

aryExport(25,2) = "A1"

aryExport(25,3) = "data"

Dim objExcelWorkbook 'as Excel.Workbook

Set objExcelWorkbook = copyObjectsToExcelSheet(ActiveDocument, aryExport)

kvijay173
New Contributor III

Re: Export to Excel / CSV as multiple files

Hi Rob

I am getting error like below. What should I do.

My object ID is 25 so I tried below and when tried to run the macro...

Error: Type mismatch: 'copyObjectsToExcelSheet'

Code used:

Dim aryExport(25,3)

aryExport(25,0) = "objSalesPerYearAndRegion"

aryExport(25,1) = "Sales"

aryExport(25,2) = "A1"

aryExport(25,3) = "data"

Dim objExcelWorkbook 'as Excel.Workbook

Set objExcelWorkbook = copyObjectsToExcelSheet(ActiveDocument, aryExport)

Community Browser