BookmarkSubscribeRSS Feed
funkychunkymunky
Calcite | Level 5

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;

3 REPLIES 3
Reeza
Super User

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.

SASKiwi
PROC Star

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

Tim_SAS
Barite | Level 11

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2702 views
  • 0 likes
  • 4 in conversation