I am trying to create excel spreadsheet via the stored process by using Proc Export. Log suggests that file has been created without any error but when I try to open the file I get this error:
Excel cannot open the file 'myfile.xlsx' because the file format or the file extension is not valid. Verify that the file has not been corrupted or that the file extension matches the format of the file.
I am using following code in my stored process to create spreadsheets.
%if &Output=EXCEL %then %do;
data _null_;
rc=stpsrv_header('Content-type','application/vnd.ms-excel');
rc=stpsrv_header('Content-disposition',"attachment; filename=&geosumlvl._&tabname..xlsx");
run;
proc export data=Extract_ACS outfile=_webout dbms=xlsx replace;
sheet='mysheet';
run;
%end;
I am wondering if we have a solution to resolve this issue?
... View more