I am creating an EXCEL file using the code below. File looks perfectly good when there is data. I am generating like 20 such files with multiple PROC PRINT statements. When there are no observations for a particular file , the file is getting generated but on opening the EXCEL file , it gives me "Unable to read file" error.
Can anyone help me out. I need to show blank sheet with title and header when there is no data.
I get this error all the time. It only seems to happen with the EXCELXP tagset.
From my experience, it has to do with a format or attribute of one of the output fields being incorrect and the out (which is XML) being incorrect. These are very difficult to find because the errors are logged in a file that is hidden (some form of MSO:Content name).
I usually try to strip off every format attribute of the output file and re-run to see if the file is now readable. If the error persists, your only option is to try to find the log file (you need to manually type the entire file name in) and see if it helps.