BookmarkSubscribeRSS Feed
rinsabraham
Obsidian | Level 7

Hi Team,

We have one excel the template with data we are trying to delete the data from existing sheet and appending with new data along with the new additional column while we do we not getting same format for new addition column.Can you please help me out?

 

refer the below code;

libname ccc odbc no prompt="dsn=excel files; dbq=pathname ";

proc datasets lib=ccc;

delete 'Data$'n;

run;

proc datasets lib=ccc;

delete data;

run;

 

proc append base=ccc.data data=abc;

run;

libname ccc clear;

 

 

 

4 REPLIES 4
andreas_lds
Jade | Level 19

Afaik you can't delete data and keep formatting at the same time using sas. Some time ago someone suggest using two sheets in the excel-file: one with the required layout and another one with the data. The search facility should show the post.

rinsabraham
Obsidian | Level 7

Thanks for your replying.

But we want to get the data into one sheet with the existing template. Please find the attachment after execution of our code result. Here phone number column is the addition column which we have appended into the excel the sheet and formating is not happening into the new column.

 

andreas_lds
Jade | Level 19

1. Don't repeat your posts if you don't get an answer fast enough.

2. I can't help you any further, because i won't open office files.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 886 views
  • 0 likes
  • 2 in conversation