This project has moved and is read-only. For the latest updates, please go here.

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

Oct 11, 2014 at 10: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 10:50 PM
Edited Oct 12, 2014 at 2: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 12, 2014 at 12:17 AM
I didn't know that was possible. Create an issue and attach the file.
Oct 12, 2014 at 12:43 AM
MDeLeon wrote:
I didn't know that was possible. Create an issue and attach the file.
Oki doki - Will do.
Oct 12, 2014 at 2: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 2: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 4: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.