In tagsets.excelXP, I was able to add &B or &14 to make my header bold or 14 point font, etc. This causes my xlsx ODS Excel book to be corrupt and unable to be opened. Is there a solution?
Hi:
What code did you use? Also, did you use TAGSETS.EXCELXP or ODS EXCEL. The approved file extension for ODS EXCEL is .XLSX and the approved file extension for TAGSETS.EXCELXP is .XML -- you should not use a file extension of .XLSX with TAGSETS.EXCELXP.
When I tested in 9.4, ODS TAGSETS.EXCELXP worked and made the header string bold and italic, as shown below. Then I tested in ODS EXCEL -- same code and I only changed 2 things -- I changed the destination to ODS EXCEL and I changed the file extension to .XLSX and that worked too.
cynthia
TAGSETS.EXCELXP test using file extension .XML
ODS EXCEL test using file extension .XLSX
As Cynthia said, you must use .xml for the extension for files created by the ExcelXP tagset. Do not use .xls or .xlsx, otherwise Excel will report an error when opening the file:
When you open a file in Microsoft Office Excel 2007 or later that contains content that does not match the files extension, you receive the following warning message: The file you are trying to open, 'name.ext', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
Error opening file: "The file format differs from the format that the file name extension specifies"
http://support.microsoft.com/kb/948615
Vince DelGobbo
SAS R&D
I'm not sure if you meant to reply to someone else, but my question was regarding using ODS Excel. Have a good day.
I did mean to reply to you.
Cynthia asked some questions but you haven't answered. Without knowing the code you are using or the exact error message that you received, we can only guess at an answer.
You need to provide better information.
Vince DelGobbo
SAS R&D
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.