Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
shashank20
Contributor III
Contributor III

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

shashank20
Contributor III
Contributor III
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

shashank20
Contributor III
Contributor III
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 ?

shashank20
Contributor III
Contributor III
Author

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

Thanks

shashank20
Contributor III
Contributor III
Author

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

shashank20
Contributor III
Contributor III
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"