BookmarkSubscribeRSS Feed
shru
Calcite | Level 5

Hi,

I need to put zero to the empty cells of an column in excel.

My code updates the the column of an excel with the some values but some rows will be empty which dont have values.

So how can i put zero's to the rows once i update my excel coulmn with figures.

I am using %openexcel;

and

put statement to put the values..

So how can i do it?

Thanks

2 REPLIES 2
OS2Rules
Obsidian | Level 7

I use "option missing=0; " in my SAS code.

to default the missing data to 0 (zero). 

Should work when writing to Excel.

shru
Calcite | Level 5

Hi,

My excel file is like this

  obs Mar-12

   1   56

   2    34

  4    .

  5   .

  6  .

  7   78

8    12

like this.

My code is

data _null_;

file sas2xl;

put unquote(bquote("select(R&rowC&col)");PUT unquote(bquote("&value");

run;

like wise my code updates the excel,but for some there wont be a value so in that place i need to put zero

How can i do this?

Help me

Thanks

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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