ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   save xlsx files (https://www.excelbanter.com/excel-programming/429793-save-xlsx-files.html)

Kim Carlsen

save xlsx files
 
Hi
I try to save a file in xlsx format, but I get a:
"This extension can not be used with the selected file type. Change the file
extension in the File name text box or select a different file type by
changing the Save as type."

the failing code look like this:
xlWorkBook.SaveAs(fileName, Excel.

XlFileFormat.xlExcel12, misValue, misValue, misValue, misValue,
Excel.XlSaveAsAccessMode.xlNoChange, misValue, misValue, misValue, misValue,
misValue);

What is the correct syntax?
I can get it work with saving to xls file.

Regards
Kim


Jacob Skaria

save xlsx files
 
Kim, refer the below link

http://www.rondebruin.nl/saveas.htm

If this post helps click Yes
---------------
Jacob Skaria


"Kim Carlsen" wrote:

Hi
I try to save a file in xlsx format, but I get a:
"This extension can not be used with the selected file type. Change the file
extension in the File name text box or select a different file type by
changing the Save as type."

the failing code look like this:
xlWorkBook.SaveAs(fileName, Excel.

XlFileFormat.xlExcel12, misValue, misValue, misValue, misValue,
Excel.XlSaveAsAccessMode.xlNoChange, misValue, misValue, misValue, misValue,
misValue);

What is the correct syntax?
I can get it work with saving to xls file.

Regards
Kim



All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com