Date: Wed, 24 Mar 2010 12:58:43 -0700
Reply-To: mlhoward@avalon.net
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: excelxp tagset and data type in xml
Content-Type: text/plain; charset="UTF-8"
It might be better to create a character variable in the data step and use that
data newdata;
set test_dset;
informat member_var_char $10.;
member_var_char=put(member_var,z10.);
run;
Then use member_var_char in your proc print.
-Mary
--- apsteinberg@HOTMAIL.COM wrote:
From: Captain <apsteinberg@HOTMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: excelxp tagset and data type in xml
Date: Wed, 24 Mar 2010 11:22:51 -0700
Hi,
I am pretty new to the excelxp taget world, but am finding my way. My
current prob is I am using a proc print, the member_var is a
character, but only has numerics. So when ods outputs it to xlm the
data type is numeric instead of string. I need it to be string so if
someone saves the excel document I dont lose the leading zeros of the
member_var. How can I change the data type of a variable when it
writes it to xml. My code is below.
ods tagsets.ExcelXP path="xxx"
file="test.xls");
proc print data = test_dset noobs;
var member_var update;
run;
ods tagsets.ExcelXP close;