I have an excel report I built that drop the file into my ftp drive. when I open the file I get a "File Format and Extension .... don't match.."
I can still bypass and open the file. Just wondering if there is a way to have the program be exported "properly" so that the error doesnt pop up.
ods tagsets.ExcelXP path= "&OUTPUT_PATH" file= 'Weekly Report.xls' Style=Printer;
I tried xlsx as the extension but it wont open the file at all.
@Jyuen204 wrote:
I have an excel report I built that drop the file into my ftp drive. when I open the file I get a "File Format and Extension .... don't match.."
Of course you do. The EXCELXP creates XML content. Not XLS. Not XLSX. Not HTML. You may get away with XLSX, but the file should have an XML extension.
You may have to add XML to whatever program you are using to view XLS files as a default application.
SAS now had the EXCEL destination you can use that writes an XLSX file.
There are some minor differences in what options the two support, so you might need to also make some other changes.
Try writing the file with an XML file extension. That's what we do with our ExcelXP spreadsheets and Excel opens it successfully by double-clicking on it.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.