Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Macro in Loop

Hi All,

Need some suggestions.

I have a macro to update a date in an excel.

But As I need to run the code in a loop for each day, the excel file which I have is too huge that it takes a lot of time to update a single value. So if I am running it for 1 year it will run forever.

Any ideas about getting better performance, like opening file one time for each month and performing it for all the days and closing it . and same.


Hope I am clear.


Thanks in advance.

3 Replies
zhadrakas
Specialist II
Specialist II

hi,

macro execution work single threaded, so you have bad Performance in General.

Would it be better to go this way?

1] Load the data you want into qlikview

2] Transform, Update your date, etc.

3] Store it into Excel or CSV

this can be helpful

Can I use the script to store into xlsx?

regards

tim

Anonymous
Not applicable
Author

Thanks for your feedback Tim,

But the issue here is different.

in excel, if i update the date, the value in another cell changes. Lot of calculation is implemented for that. So I ned to read that value based on the date. So changing the date in loop and reading.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

If the date-to-modify resides in a single column, maybe let QV read the dates, transform them according to the rules you specify and write them to csv in the exact same order as the original cells. Then simply copy/paste the new values in the orgiinal column.