09-16-2014 10:41 AM
I want to export a data set to "sheet1" in an excel file, if the data already exists in "sheet1", then replace it. The below SAS code works well if the excel file is a ".xlsx" file. However, I need do the similar work for a ".xls" excel file, can I do such thing for a ".xls" excel file? Thank you.
09-16-2014 11:14 AM
Just an FYI, I tried and working fine for me when used replace option. Here is the code.
proc export data=want
09-16-2014 11:35 AM
I think that wutao9999 want to write in a specific sheet of an existing excel file (at lest is what i also need to do),
for what i read from Hima's link seems that SAS when want to write in a specific sheet try to create it , and if the name that we want to use is alredy in used SAS add a numeric character to avoid the duplication...
so, this mean that i have no way to export a data set in a specific sheet in a alredy existing excel file?
thank a lot
just to be sure i add the code that i'm using
data = test
outfile = "C:\test\fileexcel.xlsx"
DBMS = EXCEL
SHEET = "foglio1";
09-16-2014 11:45 AM
There is a hotfix for what you are looking for
09-16-2014 12:15 PM
It has three possible values for the type parameter: N to create a new workbook, A to add a worksheet and M to modify an existing worksheet. It also has a range parameter so that you can write data starting at a particular range without having to predefine the range in Excel. The macro also provides a way to take advantage of Excel templates (see, e.g., http://www.torsas.ca/attachments/File/09122014/Art_TASS_12Sep2014.pdf )
Need further help from the community? Please ask a new question.