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: 
migle_purzelyte
Partner - Contributor II
Partner - Contributor II

Macro: Export as xlsx

Hello,

I wonder what is VBScript function to export table as xlsx in Qlikview November 2017.

For xls I was using ExportBiff but I cannot find what to use for xlsx.

Thanks in advance,

Migle

1 Solution

Accepted Solutions
andrzejdobiegal
Partner - Contributor II
Partner - Contributor II

You can use

sub ChartExport()
set obj = ActiveDocument.GetSheetObject("CH01")
obj.ServerSideExportEx "export\Export.xlsx", ";" , 6
end sub

QV November 2018 SR2

regards Andrzej

View solution in original post

19 Replies
YoussefBelloum
Champion
Champion

Hi,

if i'm not wrong, you can only export on xlsx with the latest release..

mto‌ maybe can confirm this ?

Michael_Tarallo
Employee
Employee

Hi Migle / Youssef - I don't have this setup - but I believe it is the same - just now supports .xlsx - in the past - it would create a .xlsx - but there would be an error opening the file. Can you give it a try using the extension .xlsx and let us know?

Thanks

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

Regards,

Michael Tarallo (@mtarallo) | Twitter

Qlik

Regards,
Mike Tarallo
Qlik
migle_purzelyte
Partner - Contributor II
Partner - Contributor II
Author

Using ExportBiff with xlsx extension creates invalid file.

gardenierbi
Creator II
Creator II

Hi migle.purzelyte,

Did you find a solution for this?

migle_purzelyte
Partner - Contributor II
Partner - Contributor II
Author

Unfortunately still no

Miglė Purželytė

Business IQ

gardenierbi
Creator II
Creator II

Hi mto‌,

but I believe it is the same - just now supports .xlsx - in the past - it would create a .xlsx - but there would be an error opening the file. Can you give it a try using the extension .xlsx and let us know?


The ExportBiff function still generates a document with the old .XLS format. I get the same result as migle.purzelyte‌. Is there maybe a new function available in the API to get the new .XLSX format as output?


We appreciate your help for this. We aren't the only one with this question.


Regards,

Sander

petercappelle
Partner - Contributor III
Partner - Contributor III

Hi Everyone,

This is how I do the export to xlsx in QV (november release).

sub Export

set obj = ActiveDocument.GetSheetObject("CH1")

set objExcel = CreateObject("Excel.Application")

objExcel.Visible = False

objExcel.Workbooks.Add

Set ASheet = objExcel.ActiveSheet

ASheet.Application.DisplayAlerts = False

ASheet.Range("A1").Select

obj.CopyTableToClipboard true

ASheet.Paste

ASheet.SaveAs "c:\test.xlsx"

objExcel.Quit

end sub

gardenierbi
Creator II
Creator II

This will only work if MS Excel is installed on your machine. On most Qlik servers this isn't the case.

nihalbuddy09
Creator II
Creator II

Hi Peter,

Thank you for posting the macro which I am going to use to export the data into .xlsx file format. But in my requirement while saving the file I need the today's date and timestamp along with the file name.

I have to run the macro multiple times in a day so that I will have a new file every time, can you please help me out how to pass the date and timestamp in this macro.


example file names:

Account_A1_2018-09-23_05-30-05.xlsx

Account_A1_2018-09-23_15-20-15.xlsx


Thanks,

Nihal