I have a macro that exports charts from QV-Application into Excel.
In QV Application there are two tabs & each tab contains multiple charts.
Here the requirement is to export these charts into a Excel & all charts from one tab should be in one Sheet & thus there will be two Sheets in a excel file.
Since MS-Excel is not installed on machine, Macro is not able run & generate this Excel file.
Is there any way to generate Excel file with two sheets & each sheet contains multiple charts without installed MS-Excel?
Thank you in advance.
Do you mean that you are trying to export from QlikView Desktop installed on server.
Then QlikView will not create any file (Excel) even if you click on export to excel. Nothing will work, because no excel is installed on server.
However if you are trying to export from a browser of a client machine where you have excel installed, then the export to excel will work even though the excel is not installed on the Server from where you are hosting qlikview files.
Path = "C:\TEST.xls"
set obj = ActiveDocument.GetSheetObject("CH01")
But Here only one chart is added to one Excel. My requirement is to add multiple charts on one sheet & in a way to create two sheets for charts of two Tabs of QV-Application .
can we modify above code in any way such that it can fulfill above requirement.
If you are looking to export multiple charts then I hope the below link should be helpful...
Thank you for your valuable time & reply, but as mentioned in above link - it needs to create Excel Application Object
Set objExcelApp = CreateObject("Excel.Application")
which requires MS-Excel installed on machine.
But My requirement is to generate Excel file (with multiple objects to be export) without MS-Excel installed on machine.
Is there other solution that will fulfill above requirement?
Note that if you want just export chart to excel (if you basically have to emulate context menu command `Send to Excel`) - you can do it without having Excel installed.
Use `exportBiff` method, something like:
set chart = doc.GetSheetObject("CH01")
I believe exportbiff exports only one chart to one excel file. So if it is crucial requirement for you, you stuck with Excel automation method. That implies you need have Excel installed.
Please find the below thread which may help you to export multiple charts to excel. Am not sure about csv file.
May be by same way you can use other macro for csv.
If you want to export various objects into a excel-file per macro you will need an installed excel-release - I think there is no direct way to bypass this. What speaked against an excel-installation (licence costs, security concerns, other things ...)?
Of course you could export your objects into csv or another textfile-formats - but there you have no practically way to separate those objects, you could only append one object below the anothers (which is possible - but rather difficult to split them again).
Better would be to use for each object a single csv and combine them with excel-macros within the target application. Easier then this would be to use an excel master-file which is already designed and layouted and which grabbed the data from those csv as an external data-source.