The SAS Output Delivery System and reporting techniques

Insert zero in the column (excel)

Reply
Contributor
Posts: 32

Insert zero in the column (excel)

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

Super Contributor
Posts: 358

Re: Insert zero in the column (excel)

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

to default the missing data to 0 (zero). 

Should work when writing to Excel.

Contributor
Posts: 32

Re: Insert zero in the column (excel)

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

Ask a Question
Discussion stats
  • 2 replies
  • 239 views
  • 0 likes
  • 2 in conversation