Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
May I know if we can store the table loaded in QliKView script into .xls or .xlsx file?
Have gone through few posts, but didnt find the solution for the same.
Can anyone please help me in here?
Thanks in advance
Regards,
Punit
I think we can use this macro,but need to know if we can get tableName instead of ObjectID.
Sub BasicExportToExcel
DIM ExcelApplication, ExcelWorkbook
SET ExcelApplication = CREATEOBJECT("Excel.Application")
SET ExcelWorkbook = ExcelApplication.Workbooks.Add
ActiveDocument.GetSheetObject("TB01").CopyTableToClipBoard TRUE
ExcelWorkbook.Worksheets(1).Paste
ExcelApplication.DisplayAlerts = FALSE
ExcelWorkbook.SaveAs "C:\BuffaloBI - Post Content\Qlikview\Export Excel\test.xls", 56
ExcelApplication.Quit
MsgBox "Export Complete"
End Sub
If we can get table Name then the Macro can be used for exporting the data to required format from the script.
No, this macro would not work from script. The ActiveDocument handle is not available from script. The only idea I can think of is to store it in csv format (txt) and call some batch converter on the file. Google "csv to excel command line" and you'll see lot's of options ranging from free to low cost.
-Rob
Set extension of your CSV file to .xls and Excel should open it. SAP used this advanced technology for export
Thanks for your reply, will work on the proposed solution.