Why won't Excel save my .xlsx file>

For a couple/few months, Excel occasionally won’t save a file as .xlsx.

Microsoft Excel cannot access the file ‘[file name]_Current_Output.xlsx’. There are several possible reasons:

  • The file name or path does not exist.
  • The file is being used by another program.
  • The workbook you are trying to save has the same name as a currently open workbook.

So apparently, Excel thinks I’m trying to save to an open file; except I’m not. I open Current_Output and save it to Prev. I close Prev and upload it and the current file into Access, export them as fixed position text files, and run them through my programs. One program writes a new Current_Output.txt file. I import that into Excel and do what I need to do, then try to save it as Curent_Output.xlsx. That’s when I get the error. But the original Current_Output.xlsx files had been closed for a while.

The workaround is to save Current_Output.xls, close Excel completely, open Current_Output.xls, and then save it to Current_Output.xlsx. I could just use the .xls file for the Prev each month, but I prefer to use .xlsx.

So why does Excel think the .xlsx file is open when it isn’t?

Excel uses lock files to tell if a file is open. Occasionally those don’t get deleted. Have you turned on “view hidden files” and checked if a lock file is still hanging around when this happens?

Wouldn’t even know where to look. In any case, Excel shouldn’t show a closed file as being open.

Your description of your process is not very clear. You say you “open Current_Output and save it to Prev”. I guess by that you mean that you open Current_Output.xlsx in Excel. You then never mention at what point you close that Excel window, but you later assert that it “had been closed for a while”. If you indeed still have the window open with Current_Output.xlsx in it, you need to close that window before you try to save to that name.

Yes, I open Current_Output.xlsx in Excel. Then I save it as Prev.xlsx and Prev.csv. Then I close that window. I do not quit Excel because A) I have a spreadsheet I use all day; and B) I need to be in Excel when I open the new Current_Output.txt file (which needs to be saved as Current_Output.xlsx). But the original Current_Output file window is closed after it is re-saved as Prev.