BookmarkSubscribeRSS Feed
ballardw
Super User

Your output that you have shown appears to be generating a line of text from the macro. So that is what you get when you export the result.

 

You may to dig into the macro code and find the part that is actually writing the output. From what you are showing you might find a data step with PUT statements. There should be a data set that is being used to create those PUT statments. That is the data set that you likely need to export. You may want to add appropriated labels to variables or other formatting options and then try Proc Print with an ODS destination.

 

 

nazmul
Quartz | Level 8

Dear Ballardw

 

I like your idea. But I am sorry to say that I am not this much efficient in SAS. Is it possible for you to explain the issue with an example perferably with a SAS dataset and relevant code.

 

I really appreciate your help.

 

Dear Reeza,

 

I have contacted with Eventus representative. They could not give me any solution.

Patrick
Opal | Level 21

@nazmul

What you're asking from @ballardw "perferably with a SAS dataset and relevant code" is what I'm missing from you.

 

Why don't you post a data step creating the SAS table structure you want to export to Excel. This will allow us to post working and tested code samples for what you're asking for.

 

Or are you asking for these reports you've posted pictures of to be written to Excel? If that's the case then most likely changes to the macro creating these reports would be required and you would have to post a working sample with all the code first (so a data step creating source sample data, the full macro code and the call to the macro with the sample source data creating the output - just something with fully works and which we can run in our environment to then modify and create the Excel output you're after). 

 

 

nazmul
Quartz | Level 8

Hi Patrick,

 

Thank you for coming forward to helping me. I found so many nice people like you in this platform. I think I do not want to spend time in trying to convert the HTML sas output to excel output anymore. I have already spent one whole day on it. I am expressing my cordial gratitude to all of you for helping me

 

Hasan 

Reeza
Super User

Not ideal but you can copy and paste the HTML to an Excel file manually. It gets separated to cells automatically though you'll probably have to adjust some fields for now. 

nazmul
Quartz | Level 8

Thank you Reeza. I am doing it manually now.

 

Hasan

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 20 replies
  • 1685 views
  • 2 likes
  • 5 in conversation