Excel 2019/Windows 10 - I have recently been getting an error (every time) when starting Excel. The error is [The file format and extension of 'Loading' don't match. The file could be corrupted or unsafe.]
While doing a Google search, this error normally occurs with a corrupted spreadsheet. I am getting this error when starting Excel WITHOUT specifying any file to open. The NEXT screen I get after I click 'OK' on the error asks if I want a blank workbook, or lists recent spreadsheets to choose to open.
I have done a search on my computer... there is no file called Loading.x* on my computer. I have disabled all COM add-Ins, and I get the same error.
Other than this annoying error, I can still open all my files, or create a blank file. I only get this error on startup. Once I get the error, I can open any number of workbooks without getting the error again.
If I open any Excel file by clicking on it, which then starts Excel, I still get the error referencing the 'Loading' file (i.e. the exact same error as above). There is no reference to the filename that I am actually opening.
Any idea how to fix this?
I have an excel spreadsheet named "data_covnertot_0.25.xlsm" that has a tonne of VBA in it.
When opening, after the user clicks "Enables Macros" a couple of warnings appear.
These errors occur before any Macros have been run.
There are a few similar queries on Stack Overflow but they either haven't been answered or are regarding add-ons of which I am not using any.
The spreadsheet is saved on ProjectWise however, the error messages occurs regardless of where it is saved.
The error message is:
"Sorry, we couldn't find '...........Copy of data_covnertor_0.18.xlsm'. Is it possible it was moved, renamed or deleted?"
followed a second error message:
"Microsoft Excel cannot access the file '...........Copy of data_covnertor_0.18.xlsm'. 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 as a currently open workbook
The spreadsheet works fine after clicking ok to both messages, bit as this will be used by a lot of people I want it to be clean and neat.
The file link in the messages is to a share point site, which is where the spreadsheet was saved before being moved to ProjectWise.
I've had a look through all the VBA, sheets etc, carrying out searches etc, and I can't find any reference to the copy of the old version of this spreadsheet.
Can anyone advise where I should be looking
In my case the cause of the error was a button (a form control button) that was referencing a Macro in a different workbook.
I found the offending button by symptomatically deleting sheets and saving copies of the workbook until the error disappeared.
I am running a macro from an excel workbook on my local machine, and at the end of it the macro copies a set of data and pastes it in a log that is in a separate workbook. I can get it working fine when the log is on my local machine, but I am having trouble getting it to copy data to the log when the workbook is stored on the company sharepoint server. I have both files open in excel (with edit permissions on the sharepoint based file), but when I try to open the workbook it fails. Trying to diagnose the problem I even had the macro spit out a list of all the open excel files at the moment and it does not seem to list the sharepoint baesd file (despite it obviously being open at the moment). Any ideas on how I can access this file? I don't necessarily need it to open the file on its own, I am more than happy to go into sharepoint manually and open the file, I just can't get the data to copy across for some reason. Any help that could be provided would be most appreciated, thanks in advance!
The line of code causing the problem is:
Set logbook = Application.Workbooks("Log")
Where the file name is Log.xlsx and that file is open in excel at the time the macro is running.
The error I get is:
Run-time error '9': Subscript out of range
I am getting an error when opening excel: We found a problem with some content in XXX. Do you want us to try and recover as much as we can? if you trust he source of this workbook, click Yes."
clicking Yes, "fixes" the issue but deletes a lot of VBA code, two weeks worth.
Whatever the issue it was introduced yesterday, I do not want to redo two weeks worth of coding. Is there anyway I can view what was removed, or open the VBA in notepad++ or something without opening the excel?
I opened another excel workbook and tried all the different options for the argument XlCorruptLoad in the Workbooks.Open to open the corrupt workbook. I noticed that there were two non existing sheets created in the project explroer of the corrupt workbook that had the code in there. I am not sure if it did that s a result of what I did or it was there all along and I did not notice it
Note that the reason I had a corrupted data is because the code was extracting a list and putting it in a cell validation formula..i guess I overloaded it.
I'm almost sure I will have to create a new excel file, but maybe at least here I get some ideas what was the source of the problem.
My excel file is constantly giving the following error:
Excel found unreadable content in 'filename.xlsm'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes.
So I do. And the file opens as repaired showing:
Removed Records: Sorting from /xl/worksheets/sheet10.xml part.
The detail is that I don't even have a sheet10
Its a big excel file full of custom-objects. But I have no DB connections or autofilter so could not relate to AutoFilter Criteria Using Array (Error) - Too Large String? or xlsx error: "Removed Records: Named range from /xl/workbook.xml part" when tried to resolve errors.
Anyone has a clue what's going on?
tks in advance
try clearing the sort before saving down the workbook. When this happened to me I had my sheet references mixed up so the sort wasn't cleared
Sheets(yoursheetname).Sort.SortFields.Clear
I am afraid I cannot explain what is going on, but I had similar experience several times - always with XLSM file. In the latest case I learnt that Excel did not like the same range name used twice, when defined as Worksheet range name (we assumed it is safe to use it that way).
Our troubleshooting path is:
try to save file as XLSB (binary macro file) and either use XLSB file or save it back to XLSM
check file history (we always keep daily snapshots) and find when the problem firstly occurred; use previous version and port your changes
extract the code (via SVN code), create a new workbook and import the code back
Usually Step 1 solves the problem, but Step 3 never failed us.
Awesome,
This issue has been driving me crazy!
It seems that saving as the xlsb (binary) file PLUS adding the clearing of sort fields appears to have sorted out my issue.
I added the following code to the BeforeClose sub, it appears to clear the fields really quick, changes to my Dashboard and prompts for saving.
The xlsb file saved over a mb in file size and appears to load a little quicker!
Thanks for the pointers & support!
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Sht As Worksheet
' Clear all Sort Fields prior to Save & Exit
For Each Sht In Application.Worksheets
Sht.Sort.SortFields.Clear
Next Sht
aa1_Dashboard1.Select
aa1_Dashboard1.Activate
End Sub
I would like to add my own confirmation regarding clearing sort fields in your spreadsheet, as first suggested by Chris. I specifically had the error occur after I used column sorting in a VBA macro, so I deduced that the problem must be column/field-Sort related. It was.
Adding the line:
Sheets(yoursheetname).Sort.SortFields.Clear
after the sort command allowed the sorted columns to remain sorted (in my case), but cleared whatever was causing the
"Sorting from /xl/worksheets/sheet10.xml part." error when the file was next opened.
Many thanks for your support.
I don't know if this will help anyone but it's solved my problem. I had an excel sheet, nothing complex, just contacts, a much used file in Excel 2010 on Win7. Today I was using the 'filter' to select specific groups to email targeted content to. In the middle of selecting and copying to paste into Outlook, the document came up with a pop up as if I was installing something, then the 'installer' both of which I cancelled out of. The Document closed and then on trying to reopen, I was getting the error message. If I chose 'yes' to repair I was given just the subset of my filtered list, so about 40 of my 350 records, the rest lost. I googled and tried different things, including opening in Googledocs google sheets and nothing worked. I never 'saved' the repaired version as my old data wasn't in that. Just now, I right clicked on my document in explorer and chose "restore previous versions" and it brought me to the version of yesterday - thankfully, nothing added to it since then. Opened that one and bingo, it opened fine with ALL the data in it. I know the filter had corrupted it, so will be cautious next time I use it. I don't know why it doesn't like the filter but 4 hours on, i can now calm down and relax! Hope this helps someone.
was having this issue as well. I have a spreadsheet with multiple tabs (maybe 30 tabs?) and had filters on each sheet, and shared on SharedPoint. The error was not enabling editing of the file on SharePoint. I removed the filters on every sheet and uploaded back to SharePoint and the issue is gone!
I did what Chris mentioned above. Clear the sort fields in your spreadsheet.
Sheets(yoursheetname).Sort.SortFields.Clear
Also, save the file as *.xlsb.
That should get it to work.
When you get a message telling that Excel found unreadable.... just click "Open" and then close all the following messages you get.
-In the VBE open the project showing the name of Addin or the .xlsm.. the click anywhere in any module of the workbook as you are going to edit the text of the macro, then click save, select workbook type like Addin select the folder where you want to save it, give it a new name then click "Save", that is all you have to do, the new file you created will ok.