Hello,
this works perfect to save the file as CSV
XLOpen>myfilenam.xlsx,1,xlHo
XLSave>xlHo,c:\mydirectory\myfilename.csv,24
I moved to a computer computer, also with Excel 2016 and the XLSX file ends up getting a new tab, called myfilename. A CSV file is also created, but it is empty.
I tried comparing the differences in Excel 2016 "trust center" settings between the two computers but could not find a difference.
Anyone bump into this before and have any tips on how to "loosen up" Excel 2016?
Bob
problem with XLSAVE to CSV
Moderators: JRL, Dorian (MJT support)
Re: problem with XLSAVE to CSV
hi,
you have given not much information,
but maybe it could have something to do with the ,24
after XLSave>xlHo,c:\mydirectory\myfilename.csv ?
what function has the ,24 ?
kind regards,
Djek
you have given not much information,
but maybe it could have something to do with the ,24
after XLSave>xlHo,c:\mydirectory\myfilename.csv ?
what function has the ,24 ?
kind regards,
Djek
Re: problem with XLSAVE to CSV
Hello,
24 is the code that tells XLSAVE to save as CSV
From the MS Help file:
XLSave>XLBookHandle,FileName[,fileformat]
Not supported in Macro Scheduler Lite. This function requires Microsoft Excel to be installed. Saves the specified workbook to the given filename. XLBookHandle is a handle returned by XLCreate/XLOpen.
To save to a different format (.e.g. to CSV or a different version of Excel) set the optional fileformat value to an xlFileFormat enumerator. https://msdn.microsoft.com/en-us/librar ... 98017.aspx
Bob
24 is the code that tells XLSAVE to save as CSV
From the MS Help file:
XLSave>XLBookHandle,FileName[,fileformat]
Not supported in Macro Scheduler Lite. This function requires Microsoft Excel to be installed. Saves the specified workbook to the given filename. XLBookHandle is a handle returned by XLCreate/XLOpen.
To save to a different format (.e.g. to CSV or a different version of Excel) set the optional fileformat value to an xlFileFormat enumerator. https://msdn.microsoft.com/en-us/librar ... 98017.aspx
Bob
Re: problem with XLSAVE to CSV
Hi,
I just found the issue was with my XLSX file, not the XLSAVE command.
I copied all the cells that had data into a new workbook and then saved using same file name and now save as CSV works again.
There must have been some hidden data or problem with the XML for the the XLSX file.
Bob
I just found the issue was with my XLSX file, not the XLSAVE command.
I copied all the cells that had data into a new workbook and then saved using same file name and now save as CSV works again.
There must have been some hidden data or problem with the XML for the the XLSX file.
Bob
Re: problem with XLSAVE to CSV
aha , thanks Bob
didnt know about the fileformat option,
glad it is solved !
kind regards
Djek
didnt know about the fileformat option,
glad it is solved !
kind regards
Djek