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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
bohravanraj
Partner - Creator II
Partner - Creator II

Macro to Export Multiple Object into Multiple sheet loop by Field and store it into paritcular Location

Hello all,

i need a help in writing a macro where with a click on button multiple object can be exported into multiple excel, store it into an location and close the Excel application.

Any help is appreciated.

Regards,

Vanraj Dinesh Bohra

13 Replies
vvira1316
Specialist II
Specialist II

Hi Vanraj,

I'll be able to check your code during US Day time tomorrow.

Can you please advise what you are trying to do with following modification? If you follow the charts, button action in QVW and VB Macro code from the script then you can make changes.

aryExport(0,0) = "Export"

aryExport(0,1) = "East"

aryExport(0,2) = "A2"

aryExport(0,3) = "data"

aryExport(0,4) = "Region"

aryExport(0,5) = "East

What I had was as follows

aryExport(0,0) = "CH01" (Chart Identifier, obtained from chart property in QVW)

aryExport(0,1) = "Ind Bar Chart" (Worksheet name in the exported file)

aryExport(0,2) = "A2"     (Cell where chart/data will be placed at the time of export)

aryExport(0,3) = "image"     (Is it bitmap image of the chart or data, bar chart can be exported as image or data)

So I'm not sure what you are trying to do with above modification of yours.

Also Dim aryExport(5,3) is for looping through charts to be exported (in my case I had 6 charts so 0,1,..,5 are 6 count for it.

Best Regards,

Vijay

bohravanraj
Partner - Creator II
Partner - Creator II
Author

Hi Vijay,

In Qlikview Application, I have only one chart and its hould publish Region wise report so for each every Chart export in Excel it will first select that value and then export it.

aryExport(0,0) = "Export"     '-Chart Name

aryExport(0,1) = "East"          '-SheetName

aryExport(0,2) = "A2"               'Excel Row Number

aryExport(0,3) = "data"               'Type of data

aryExport(0,4) = "Region"          'Field to be selected before export

aryExport(0,5) = "East                'Value to be selected in above field before Export.

Please let me know if anymore clarity is required.

Regards,
Vanraj Dinesh Bohra

bohravanraj
Partner - Creator II
Partner - Creator II
Author

Hi Vijay,

I had improvised the code now,

now all the country wise excel is being generated bt only it is not getting stored on particular location,

Please see if u can help in this.

Regards,
Vanraj Dinesh Bohra

bohravanraj
Partner - Creator II
Partner - Creator II
Author

Hi Vijay,

Thanks for all your support.

i m done with the macro.

Regards,

Vanraj Dinesh Bohra