The SAS Output Delivery System and reporting techniques

Problem with ODS outputting lots of columns into excel

Reply
N/A
Posts: 1

Problem with ODS outputting lots of columns into excel

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;

Grand Advisor
Posts: 16,392

Re: Problem with ODS outputting lots of columns into excel

ODS Excel is still experimental and buggy Smiley Sad

I would report it to tech support so your specific case was noted but wouldn't necessarily expect a solution anytime soon.

Respected Advisor
Posts: 2,917

Re: Problem with ODS outputting lots of columns into excel

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";

Super Contributor
Posts: 394

Re: Problem with ODS outputting lots of columns into excel

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.

Post a Question
Discussion Stats
  • 3 replies
  • 810 views
  • 0 likes
  • 4 in conversation