c**********e 发帖数: 2007 | 1 I use the following code to tranform a SAS dataset an Excel file on Unix.
libname myfolder '/abcd/efgh/ijkl';
proc export DBMS=XLS
data=myfolder.mydata
outfile="/abcd/efgh/ijkl/myfile.xls"
replace;
run;
quit;
But my Excel file can not be opened. Anybody knows how to solve it?
The error message:
"Excel found unreadable contents in 'myfile.xls'.
Do you want to recover the contents of this workbook?
If you trust the source of this workbook, click Yes." |
a****g 发帖数: 8131 | 2 might be that your sas 9.3 is 64 bits and office is 32 bits |
c**********e 发帖数: 2007 | 3 Then how to solve the problem? |
s******8 发帖数: 102 | 4 if your SAS is 64bit 9.3, but you MS is 32 bit, you need download 'SAS PC
files server' and install it.
then dbms=exclecs like:
if there is a file ="&outpath.\&outfile..xls then,
proc export data=yourdata
outfile="&outpath.\&outfile..xls" dbms=excelcs replace;
run;
if there is not a file ="&outpath.\&outfile..xls then
proc export data=yourdata
outfile="&outpath.\&outfile..xlsb" dbms=excelcs replace;
run; |
P****D 发帖数: 11146 | 5 别提了,妾折腾过一回你说的这种情况。装了这个之后又要求那个,装了那个之后跟这
个又冲突......
不管是上班还是自家,换64位excel,妥妥的。不然就会被折腾疯了还是没法用。
【在 s******8 的大作中提到】 : if your SAS is 64bit 9.3, but you MS is 32 bit, you need download 'SAS PC : files server' and install it. : then dbms=exclecs like: : if there is a file ="&outpath.\&outfile..xls then, : proc export data=yourdata : outfile="&outpath.\&outfile..xls" dbms=excelcs replace; : run; : if there is not a file ="&outpath.\&outfile..xls then : proc export data=yourdata : outfile="&outpath.\&outfile..xlsb" dbms=excelcs replace;
|