Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cmccafferty
Contributor III
Contributor III

Exported Tables (*.xlsx) Corrupted

Anyone ever seen this message or know what I'm doing wrong?

The macro successfully downloads the files, but excel wont open them for me! 😞

4 Replies
m_woolf
Master II
Master II

I believe that ExportBIFF results in a file in .xls format. You have specified that the file has a .xlsx extention, which doesn't match the file format.

cmccafferty
Contributor III
Contributor III
Author

Thanks.

Any idea what I need to change it to?

[code]

sub Export_Trust

ActiveDocument.Sheets("ATC CM").Activate
set trust1 = ActiveDocument.GetSheetObject("CH205")
trust1.ExportBiff "X:\Business Performance\Finance\Cash\Download\QVATC.xlsx"

ActiveDocument.Sheets("Trust CM").Activate
set trust2 = ActiveDocument.GetSheetObject("CH210")
trust2.ExportBiff "X:\Business Performance\Finance\Cash\Download\QVTrust1.xlsx"
set trust3 = ActiveDocument.GetSheetObject("CH207")
trust3.ExportBiff "X:\Business Performance\Finance\Cash\Download\QVTrust2.xlsx"

end sub

 

[/code]

 

m_woolf
Master II
Master II

Change the .xlsx to .xls

cmccafferty
Contributor III
Contributor III
Author

Thanks, that worked.