BookmarkSubscribeRSS Feed
jenny_li
Calcite | Level 5


Hi, I am a new user of SAS, the problem may be simple to you.

I may investigate by myself by studying papers/internet resources but I am in a bit urgent so would like to seek for your soultion.

I want to export the tables/report generated by proc tabulate/proc report/proc print to a excel file.

Currently I am using ods tagsets.excelcp to export to a xls file.

When I open the output excel file, it would ask something like "the file format is in a different format, do you want to continue to open it?"

Then I click yes, the tables are alright.

But just one thing that the background is all blank without any gridlines, even the box of "gridlines" in View tab is ticked.

I want to know is there any easy way to show the gridlines so that the file look like a normal excel file?

Or is there any better way to export to excel?

Thanks.

2 REPLIES 2
Reeza
Super User

46949 - You cannot use a style template with the ExcelXP tagset to add grid lines to the body of a w...

The workaround is also available in the full code section.

EDIT: but then you lose the table formatting.  I'd live with it if you can. Resave your workbook to XLSX to avoid the message, the format from tag sets is actually an XML file, not an XLSX.

The other workaround is to select the cells, unlock them and apply normal style but the selection part would be annoying IMO.

SASKiwi
PROC Star

One way to avoid the message when opening Excel is to use a file extension of XML in your ODS File = statement instead of XLS, since it is really XML anyway.

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