I am trying to create a file which out puts data into excel, I have two files that have more than 25 rows and everytime excel comes across them it has a hissy fit.
It is putting the data on rows 1-25 (Columns A-Y) ad then it will populate the next row on column AZ. The rest of the data will not appear and there is a removed records error when i open up the excel format.
With the code below I get no errors or warnings in SAS, just a dodgy excel file.
Error: In event 'data': bad arguement #3 to 'format' (string expected, got nil)
I ahve tried a multitude of things to no avail, i am thinking maybe excel has a default field of 25 for something, but i dont know what?
is anyone able to help, I am at my wits end..?
I have stripped my code to the bone and changed it to a sas help data set (incase anyone wants to see if it works for them - just need to update the path).
ods excel file = " path\test.xlsx"
proc report data = sashelp.pricedata split = "|" spacing = 1 nowd;
column _all_;
run;
ods excel close;
ODS Excel is still experimental and buggy
I would report it to tech support so your specific case was noted but wouldn't necessarily expect a solution anytime soon.
What SAS version are you using including maintenance? If you are not on SAS 9.4 M2 then you are likely to have more problems.
Have you tried the EXCELXP tagset and does that work OK.
ods tagset.excelxp file = "test.xml";
As I said in reply to Keith0001's remarkably similar question, this bug is fixed in 9.4M2. The destination for Excel is still pre-production. Bugs are expected. The destination for Excel will be production in 9.4M3. You'll have to either upgrade to 9.4M2 or switch to the ExcelXP tagset as SASKiwi suggested.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: