BUG Report - Cell with Accounting Format produces crash during String Table creation

Oct 11, 2014 at 9:44 PM
My first application based on ClosedXML deals with some old, complicated spreadsheet which can crash Excel itself.

I found a bug in the GetA1Column() method of the "XLCell" class.

The cell in question is formatted as "Accounting" and contains only a hyphen. The exception occurs when the following operation is attempted:
See relevant code:

Oct 11, 2014 at 9:50 PM
Edited Oct 12, 2014 at 1:07 PM
If the developers are interested, I can provide the spreadsheet in question. The following code can produce the exception:
    var wb = new XLWorkbook("One-Item.xlsx");
    var ws = wb.Worksheet("item 1");
    ws.CopyTo("item 2");
Oct 11, 2014 at 11:17 PM
I didn't know that was possible. Create an issue and attach the file.
Oct 11, 2014 at 11:43 PM
MDeLeon wrote:
I didn't know that was possible. Create an issue and attach the file.
Oki doki - Will do.
Oct 12, 2014 at 1:01 AM
I just realized that a previous CopyTo() is required in order to replicate the issue. Therefore. I edited my previous code containing post to reflect that fact.
Oct 12, 2014 at 1:51 AM
The problem is not the hyphen, it's seems that ClosedXML doesn't handle R1C1 notations of the kind R1C-
Oct 12, 2014 at 3:45 AM
That file is being processed hundreds of times a day, interactively and programmatically, and has no problem with:
  • Excel (all versions that accept *.xlsx)
  • OpenXML SDK
  • PowerTools
  • VSTO
Furthermore, the "item 1" sheet has no problem with ClosedXML. It is the 2nd. sheet, "item 2" (created by ClosedXML) the one that has problems.