DATA Step, Macro, Functions and more

XLSX file can not be created// why $$ was added to the name

Reply
Super Contributor
Posts: 345

XLSX file can not be created// why $$ was added to the name

[ Edited ]
proc export data = payaverage
outfile = "c:\paycal"
dbms = XLSX replace;
sheet = "1.2";
run;

There was an error message below.

Error creating temporary file for XLSX file -> c:\\paycal.$$1 . It is either not an Excel
spreadsheet or it is damaged. Error code=80001019
Requested Output File is Invalid
ERROR: Export unsuccessful. See SAS Log for details.

My question is, why it automatically add $$! to the name of excel file? I checked the folder and did  find the file with this strange name. However, it cannot be opened.

ANy suggestions why this happened? I want to create an excel file.

Super Contributor
Posts: 394

Re: XLSX file can not be created// why $$ was added to the name

Does this help?

Super User
Posts: 19,770

Re: XLSX file can not be created// why $$ was added to the name

It's probably how it's marking a temporary file. Have you tried adding the extension in your code?

 

I don't think the 1.2 sheet name should cause issues, but I would also try removing it if the errors persist.

 

proc export data = payaverage
outfile = "c:\paycal.xlsx"
dbms = XLSX replace;
sheet = "1.2";
run;
Super Contributor
Posts: 345

Re: XLSX file can not be created// why $$ was added to the name

I did add xlsx. the same error message appeared

then I reomve 1.2 sheet name, it is same

 

maybe because recently I changed the template? I want to have 56,789 in steadd of 56789. I want the percentage rate be 7.8% instead of 7.833%. Otherwise, I do not know why suddenly this error message appeared

 

any other advice?

Super User
Posts: 19,770

Re: XLSX file can not be created// why $$ was added to the name

Your file already exists and you're trying to add to it?  What version of SAS do you have? XLSX didn't support adding to files until recently.

Super Contributor
Posts: 345

Re: XLSX file can not be created// why $$ was added to the name

sas 9.4

Super Contributor
Posts: 345

Re: XLSX file can not be created// why $$ was added to the name

Anyone can help with this problem?

Those codes prevously worked but now they could not.

error mesage below:

Error creating temporary file for XLSX file -> c:\TABLES.$$1 .

It is either not an Excel spreadsheet or it is damaged. Error code=80001019

Requested Output File is Invalid

 

But it still works when I use PDF option to the same destination. But I do need excel files so that I can add more.

Writing ODS PDF output to DISK destination

 

Super User
Posts: 19,770

Re: XLSX file can not be created// why $$ was added to the name

Is this a new excel file that you're creating?

Does it work in a different location? With a different dataset? with a different name?

 

Have you ever been able to create excel files and now it's not working?

Super Contributor
Posts: 345

Re: XLSX file can not be created// why $$ was added to the name

I tried a new excel file. It does not work. I tried to save to different locations, none works.

I also tried my previous code, with different locations. None works now. But they worked and saved to the same drive previously. Yes I have been able to create excel files and able to add more sheets so that I can add table 2,3,4, to an existing table.

Super User
Posts: 19,770

Re: XLSX file can not be created// why $$ was added to the name

So what's changed? Has your excel version or SAS version changed?

Super Contributor
Posts: 345

Re: XLSX file can not be created// why $$ was added to the name

I did not change my sas. Our SAS is removed installed. So I do not know the detail.

regarding My excel file, I changed the template, as I mentioned, so that the number can be written as 123,456 instead of 123456

that is the only thing I changed

Super Contributor
Posts: 345

Re: XLSX file can not be created// why $$ was added to the name

proc export data = payaverage

 outfile = "c:\paycal.xls"

 DBMS=EXCEL REPLACE;

 SHEET="1.1";

 run;

 

 

ERROR: Connect: Class not registered

ERROR: Error in the LIBNAME statement.

 

Can anybody help to give advice?

 

Super User
Posts: 19,770

Re: XLSX file can not be created// why $$ was added to the name

Post the results from the following:

 

proc setinit;run;

proc product_status;run;
Super Contributor
Posts: 345

Re: XLSX file can not be created// why $$ was added to the name

what do you mean by that

Super User
Posts: 19,770

Re: XLSX file can not be created// why $$ was added to the name


wenling wrote:

what do you mean by that


 

Since you haven't quoted the post, we have no idea of which response your replying to.

Ask a Question
Discussion stats
  • 15 replies
  • 2969 views
  • 0 likes
  • 3 in conversation