BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Bill
Quartz | Level 8

Using this code in SAS 9.4 TS1M0 to produce a large xl file ...  (56 columns, 48,000 rows)

 

proc export data=GQBPlus_BU (where=(put(OwnerOpCd,$BUCd.)="&BUCode"))

Outfile= "\GQBPlus\&BuCode.\GQBPlus_&BUCode" /*path abbreviated*/

DBMS=xlsx Replace;

Sheet="Local&BUCode";

 

Upon opening the excel file, this message comes up:

 

We found a problem with some content in ... Full message attached as a jpg file. The file opens upon a Yes answer and Excel produces an uninformative log.

 

What needs to be changed to avoid the excel message?

 

Thank you,
Bill

 

 

 

 


Capture.JPG
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

I suspect the only way to not get a message from  Excel is to ensure the resultant file doesn't violate any of Excel's expectations.

 

What is the value of &bucode? You may be trying to create a sheet name excel doesn't like.

Another option would be to export to CSV and open that with Excel. At least with CSV you can see what your exported data looks like with any file viewer that supports plain text.

 

There may also be a problem if none of your records match your where criteria.

You might try making an actual subset of the data and not using a where dataset option.

 

any diagnostics from the Proc Export like 0 records written?

View solution in original post

2 REPLIES 2
ballardw
Super User

I suspect the only way to not get a message from  Excel is to ensure the resultant file doesn't violate any of Excel's expectations.

 

What is the value of &bucode? You may be trying to create a sheet name excel doesn't like.

Another option would be to export to CSV and open that with Excel. At least with CSV you can see what your exported data looks like with any file viewer that supports plain text.

 

There may also be a problem if none of your records match your where criteria.

You might try making an actual subset of the data and not using a where dataset option.

 

any diagnostics from the Proc Export like 0 records written?

Bill
Quartz | Level 8

Thank you ballardw for your response.

 

An xl file is "successfully" produced with the code used. I don't see a problem with the file, but it is disconcerting for users to see the message. Hence I'd like to avoid the situation.

 

The value of &BUcode is PCR - xl should like that!

 

Tried the csv route and it works well. Users will be delighted!

 

Thanks,
Bill

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 6328 views
  • 0 likes
  • 2 in conversation