Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
trdandamudi
Master II
Master II

Generate each qlikview object (Sheet) to Excel in reverse order

I have three pivot objects in my qlikview and trying to export them to excel in a order. Example: I have three charts as CH-1, CH-2 and CH-3. It is generating the sheets but it is generating in reverse order like CH-3, CH-2 and CH-1.

I want the sheets to be generated like CH-1, CH-2 and CH-3.

FOR y = lBound(Objects) To uBound(Objects)  <----------- If I use this code it generates them as CH-3, CH-2, CH-1

FOR y = lBound(Objects) To uBound(Objects) step -1   <---- if I use this code it generates an empty file.

Am I missing something here ?

3 Replies
m_woolf
Master II
Master II

FOR y = UBound(Objects) To IBound(Objects) step -1

trdandamudi
Master II
Master II
Author

I added your line of code but it still does it in reverse order.

I have the following charts:

Chart-300

Chart-310

Chart-320

It is generating the tabs as chart-320, Chart-310, Chart-300 ?

m_woolf
Master II
Master II

Why not loop through the Object IDs instead?

Something like:

for y = 300 to 320 step 10

     Application.GetSheetObject("chart-" & y)

.

.

.