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

Problem to save the exported chart data into excel through macro

Hi Geniuses,

I have got one dashboard on web which actually help me to pick the data of different objects and save it into the different sheets of the excel file

Now the problem is its not saving that file, I want that once I reload the dashboard macro will run create the workbook and save it to the specified path and when I run the dashboard again it will replace the excel with the current data that is truncate and load, I dont want concatenation

I am attaching the application please look the macro exportToExcel_Variant2 I want to modify this macro.

Please help me as I have to submit this today

Thanks in advance

Shashank

14 Replies
omyahamburg
Creator II
Creator II

Before the "end Sub" command, enter

filePath = "yourDrive:\yourFolder\yourFileName".xlsx"


objExcelWorkbook.SaveAs filePath

Best regards

Joerg

Anonymous
Not applicable
Author

Awsum Its working..... But the problem is that excel will open when macro run I dont want the excel to get opened.... means once it saved the data it should close I dont want to manually close it

Thanks in advance

omyahamburg
Creator II
Creator II

then add also

objExcelWorkbook.Close

Anonymous
Not applicable
Author

I have tried that before it's not working, if i add that even the data is not coming into excel. It will show some hanged screen of excel

attach is the screenshot

err.jpg

omyahamburg
Creator II
Creator II

Could you attach a sample app ?

Anonymous
Not applicable
Author

I have attached that in the original post..... I dnt know Its not allowing me to attach now..... Please look into that

Thanks

Anonymous
Not applicable
Author

I have attached that in the original post..... I dnt know Its not allowing me to attach now..... Please look into that

Anonymous
Not applicable
Author

Hi,

This app is the one in which I have added your save logic

Please look the macro exportToExcel_Variant2

omyahamburg
Creator II
Creator II

Sorry, try to replace with this

filePath ="D:\MacroApp\qlikblog_ExportToMultipleExcelSheets\M"&".xlsx"