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

Hi Team,

 

We need output in .CSV format and for same , i am using ODS csvall .But doing so, i am not getting desired output with respect to alignment of values and header using style(header) and style(column) and also some of the colours which i have adjustedwith use of call define .

 

Can you help me if this is the default behaviour or is there any way to do so for csv output.

 

Regards,

Rajesh

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Using PROC REPORT to generate a CSV file doesn't make sense. Can you explain your requirement more?

 

 

CSV don't have columns, they're a text file with comma delimiters. 

View solution in original post

2 REPLIES 2
Reeza
Super User

Using PROC REPORT to generate a CSV file doesn't make sense. Can you explain your requirement more?

 

 

CSV don't have columns, they're a text file with comma delimiters. 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

"We need output in .CSV format and for same"

and

"lignment of values and header using style(header) and style(column) and also some of the colours which i have adjustedwith use of call define"

 

Are two mutually exclusive things.  CSV is a plain text file format, data is present separated by a comma.  There is no style information. 

 

What I suspect you are doing is opening this in Excel.  CSV is not, and I repeat not Excel.  Excel contains a CSV read module that will take the text file, and parse data into columns based on the comma.  It sill will not have any style.  

 

You need to decide what you really want, a plain text highly useful CSV file for transport of data around, or a fully functioning Excel file with very little in the way of data usability.  The first is for data transfer, the second for people to look at and you get the second by using ods tagsets.excelxp or ods excel and output using proc report.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 699 views
  • 0 likes
  • 3 in conversation