"I know Excel"

“Performing cleanup” – Excel is stuck with an old, conflicted file and will never recover.

8 min read.

This article explains how to untangle Excel when a worksheet file is conflicted and upload-blocked beyond salvation, thanks to a little demon inhabiting your computer.

Don’t believe me? Oh, do read on – there’s plenty to be said about this particular gremlin. And if you’re a regular reader, you probably already know which little fiend I’m talking about here…

Background

This is a rare case where I use a period in the title of the post. This is a stylistic choice – underlining the fatalistic, yet unfortunately realistic nature of the statement.

What Microsoft Excel means when it says it’s “Performing cleanup” is that it found a file conflict, and doesn’t know how to solve it.

When it continues “Excel is uploading your most recent changes. This will take a moment.”, it isn’t uploading anything and it will not finish. This dialog appears when Excel is unable to automatically merge changes in your worksheet – when you have both local changes and changes in the cloud.

This could happen even for a file that only you will ever edit, even if you only ever edit it on one client application, and you hadn’t modified it at all this time. Because with OneDrive, you never know.

But to cut some slack to my most/least favorite scapegoat, OneDrive was faced with a very difficult predicament here: I reopened an Excel file stored on Teams (in SharePoint, that is) that I hadn’t touched in a few days, and another user had done the unthinkable – updated the same file! In 2024, that’s almost unforgivable. How could you ever resolve such a conflict? That would require OneDrive to – gasp! – download the latest changes.

I suspect part of the issue is Excel’s Autosave feature. Even if you don’t make any changes, it’ll cause conflicts.

Anyway. If you wait long enough, the dialog will disappear, but Excel will be unable to solve the conflict and will never start synchronizing the file ever again. The file is permanently broken and OneDrive won’t even tell you about it happening.

What great fun.

Having the benefit of hindsight (and of being annoyed this took 30 minutes of my life that I’m never going to get back), having gone through the repair process now, it is actually impressive how annoyingly broken beyond any level of reprieve OneDrive can sometimes be; There’s zero indication whatsoever that synchronization isn’t working (save for when you’re closing the file – and even then, Excel will make you think everything is fine in the end).

You’ll just hear from your colleagues that your totally-online-last-modified-just-now -copy of the Excel worksheet, that you’re sharing on Teams, is missing the last couple of days worth of changes.

Not awkward at all.

Reason

Looks like this happens because Excel is caching a local file and is unable to sync latest changes from the cloud as long as that local file exists, because it thinks there is a conflict between them, even if there isn’t.

It’s also unable to remove the local file because maybe it actually has changes that the cloud version doesn’t? And even if you know for a fact there are none, Excel can’t know that. It’s a really hard Computer Science Problem®️ after all.

Plot twist – it’s not Excel’s fault.

See – I did some digging to figure out where the cached file was located. That digging included messing with Excel and its cache (see “Solutions that will not work”) and an actual solution (“Solution that should actually work”).

Using Resource Monitor in Windows, we can clearly see that Excel is using a dozen or so cached files, and even though the names don’t really make much sense to a human, I figured one of these is going to be the culprit – i.e. our conflicted file.

Cool. So how do I empty that cache that Excel is so fondly holding on to, then?

Solutions that will not work

I guess it’s worth documenting the steps that didn’t work for me, too – even though they will probably be useless for you too.

At the very least, they’ll serve as a useful reminder as to how annoying it is when a button doesn’t do anything or a cleanup finishes without cleaning anything up.

But if you like to fix the issue, skip the couple of steps below.

Now – what did I do to try and fix the issue?

1. Have faith in Microsoft – let the “cleanup” finish

You could always trust the process and let the cleanup finish.

This will, in all likelihood, not help at all.

The cleanup will work for a significant amount of time (for me, it was around 15 minutes), then finish, appear successful, Excel will close… And the next time you try to open the file, Excel will smugly offer you the same, old, expired, conflicted file, with no indication that it’s still broken beyond repair.

After we’ve agreed that was a waste of time, let’s continue.

2. Wait until the Office Document Cache invalidates

Talking about wasting time… Take a vacation.

If you’re European, the Office Document Cache will have expired when you’re back (the default lifetime is 14, 15 or 30 days, depending on who you’re asking – each period a very respectable European annual vacation in itself!) and a new copy of the file should automatically be downloaded for you.

If you live in a non-socialist country and actually have to work for your living, and/or you need this file before 2-4 weeks has gone by, OR you don’t trust Excel to magically work after a couple of weeks, proceed to the next item, although it won’t work either.

2. Empty Office Document Cache

Excel comes with a handy tool for deleting cached files. Probably because of issues like this.

Navigate to File > Options > Save > “Delete cached files”

Screenshot below should illustrate this:

After hitting the button with all your despair, confirm your action by clicking on this SECOND button labeled “Delete Cached Files”:

“Delete Cached Files” – yes, with different CapiTaLizaTion this time

And after a very short while, Excel will let you believe it’s done.

Still didn’t work? Well, that’s because the “Delete cached files”-button probably doesn’t actually do anything (see my footnote on that). I suspect it’s all part of some really smart user experience thing. It doesn’t actually remove any files.

Don’t believe me? Proceed to the next step and see if your cache was actually emptied or not.

3. Think deep thoughts about OneDrive and possible career options as a sheep herder

I’ve heard even ranchers have to deal with these productivity tools nowadays, and I don’t particularly like sheep, so I guess my career options in reality are limited.

Anyway – the button didn’t do anything. If you navigate to Excel’s cache (which I at first dumbly thought Excel was using for Caching Office Documents) at %AppData%/Microsoft/Excel or to the actual Office Document Cache at %localappdata%\Microsoft\Office\16.0\OfficeFileCache, you’ll notice they’re both full of stuff despite your desperate clicks on the “Delete Cached Files” buttons.

At this point, one thing is clear. The issue is bigger than Excel. We need to take a step back and fetch a bigger hammer.

Solution that SHOULD actually work

All of the solutions above were trying to fix Excel. But perhaps it wasn’t Excel at fault.

Nuh-uh. Because OF COURSE it was OneDrive messing with you. As usual.

Instead of simply removing a pesky, conflicted file from Excel’s little cache of treasures, we’ll need to properly deep-clean the whole cave of horrors that the Hoarder-Gremlin, that is OneDrive, inhabits.

So, of course we’ll start the process with step one:

1. Kill OneDrive

First, you will want to kill OneDrive. But if you’re unable to do that, we can also settle for simply ending the OneDrive process(es). And that can be done with the following spell, cast in PowerShell or command line:

taskkill /f /im onedrive.exe

Done? Great. That was the fun part: But now we’ll need to put on the rubber gloves and get the disinfectants – time to dive in to the lair.

2. Empty OneDrive’s cache

Navigate to the following path on your machine (either by copy-pasting it to Run dialog – win+r – or by copy-pasting it to Windows Explorer’s omnibox directly):

%localappdata%\Microsoft\Office\16.0\OfficeFileCache

And you should be faced with a beautifully organized folder like this:

I implore you: DO NOT open the folder that says “0”. You will not like what you see, and even if you think you have the mental fortitude to keep going after, you won’t understand any of it anyway. Learn from my mistakes and don’t try to make any sense of the structure.

Just delete all of the files, close the explorer instance, and walk away.

(Optional) 3. Restart OneDrive

Totally optional, but I’m including it for completeness’s sake.

You can get OneDrive back up and running (even if you have multiple different clients normally) by simply searching for an “app” called “OneDrive”. It looks like a folder with a cloud in it (you’d think it’s the other way around, wouldn’t you?) – somewhat like this:

And within a minute, you’ll have some happy little clouds in your SysTray area again, ready to mess with your other files.

Look at them! Cute, but devious.

But with that, you should be good.

4. Open Excel

If you’re in luck, now Excel will actually practically instantly show you the latest file with all of the changes from the past week that you had been missing. Your Teams meeting is long since finished, your colleagues will joke about your bad luck with OneDrive (and your awful Office-fu, I assume), you might’ve lost some data (if there was an actual conflict – there wasn’t for me), but at least your Excel will work again. Until it won’t.

Anyway. Happy Exceling!


Alright. That’s enough hating on my favorite Microsoft tool to hate on. And probably the only one that I genuinely feel is just trying constantly to mess with me – the only other way to explain these issues is that the product would be bad, and that clearly isn’t the case as it’s working fine for everyone else.

So I’ve figured it must be personal on OneDrive’s part.


Footnotes and references

Section for sources and footnotes.

“Delete cached files” in Excel

I don’t actually know what this button does. I thought it would either empty Excel’s “backup cache” or at least Excel’s portion of “Office Document Cache”, but when I tested it later, it removed a grand total of 0 files from the former, and clicking it actually added 2 files to the latter.

Intriguing. What an interesting button. Who knows what it’s supposed to do – the name certainly implies something but the reality doesn’t seem to match. It certainly didn’t help me to delete any cached files, conflicted or not.

Note on Excel cache location

I was dumb enough to google “Excel Cache Location” and Gemini, Leo or Sydney or whoever the AI assistant of the day was, gave me back this location:

%AppData%/Microsoft/Excel

Apparently based on this hyper-SEO-optimized article: https://www.thebricks.com/resources/how-to-clear-excel-cache-a-step-by-step-guide

Nice. The URL does look promising but this is not the right cache.

Yes, it is a cache that Excel uses. I guess it’s for autorecovered or recent documents. The actual cache that breaks Excel is managed by OneDrive and is located under: %localappdata%\Microsoft\Office\16.0\OfficeFileCache

(and “Deleting Cached Files” does nothing to that folder)

mm
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments