BookmarkSubscribeRSS Feed
AaroninMN
Obsidian | Level 7

Hi,

I'm failry new to SAS Add in for Microsoft Excel so please be gentle.  🙂

Background info  Using Excel 2010 and running SAS Enterprise Guide 7.1 version 7.13 HF3

Each week I update an Excel report that contains month-to-date data calculated as a percentage.  My SAS data set that I am retrieving the information from is formatted as PercentN10.1.  When I select the refresh button for SAS in Excel, the columns in the excel file will often display with hundreths visisble instead of only tenths.

Is there a setting I can change so I do not have to adjust formats each week after refreshing? 

 

Ex.

before 3.2%   after 3.20%  ( I have to adjust visible decimals after refreshing)

 

Thanks in advance!

2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
If you are pulling the data directly into Excel from SAS, then you may have to manually supply the format.

If you are using ODS, such as in a stored process, to do your report, then you may be able to control your percent. Unfortunately, Excel does not always respect the SAS formats.
cynthia
rogerjdeangelis
Barite | Level 11
There are several ways to update an excel sheet in place and maintain existing formatting. 'proc import/export',  ODS excel and xmltagsets are not able to update an existing sheet keeping the formatting, SAS Libname, Python, R and Peal can.

I don't use MS office add ons and I am not sure if 'proc import/export' can update in place or drop a sheet and repopulate.

I have quite a few posts on updating excel in place.



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