“Entries cannot be opened multiple times in Update mode” error in SpreadsheetLight

So I finally got to work on upgrading SpreadsheetLight to .NET Standard 2. The main code changes revolve around the System.Drawing assembly reference. Changing the reference to the NuGet System.Drawing.Common package solved most of it. Maybe I’ll tell you about the handful of System.Drawing related changes in another article.

But the error that gave me minor heart attacks was this one:
“Entries cannot be opened multiple times in Update mode”

Going through the code, it’s the point where SpreadsheetLight saves the whole spreadsheet, and then opens it up again for minor “enhancement” fixes. These enhancements were to change the internal relation links in the file to be how Excel writes them, rather than what the Open XML standard uses.

It’s not wrong, it’s just that I want to align whatever SpreadsheetLight creates to be as close to what Excel outputs as possible.

The idea is that a spreadsheet that Excel outputs works on LibreOffice Calc and on Apple Mac software devices such as iPhone and iPad and Mac Books.

Apparently what the Open XML SDK outputs as a default conforms to the Open XML Standard, but doesn’t quite work in iPhone/iPad (the spreadsheet doesn’t open properly in iPhone/iPad).

So as the simplest of fixes go, I just commented that entire chunk of code. Making sure the SpreadsheetLight outputs spreadsheets that will work in Excel on Microsoft Windows is the bare minimum criteria. Everything else is an extra benefit.