Problem referencing negative formatting

It’s so weird. Your file and my file all shows -11 in MS Excel in my machine. Please check the attached screenshot.

I used MS Excel to change the number format in cell K44. Please check if it works fine in your machine.

The attached zip file includes:

1. MyFile.xls - your file
2. NewMyFile.xls - modified file

The cell in newmyfile.xls now returns “-(11)” not “(11)” which is what is displayed in Excel.

It returns “(11)” in my place. Please download and try v3.2 at

I think I may have found something. In Excel, if I check “Use 1000 seperator” in the format cell dialog for the cell, StringValue returns -11. If I uncheck this option, StringValue returns (11) which is correct. Your newmyfile.xls has this option unchecked which is why it works. Is there a fix available for this?

In my machine, it all works whether check “Use 1000 seperator” or not.

Which language are you using? I test it in an English Win2000 and Chinese WinXP.

And is the decimal in your machine “,”?

I am running Windows 2003 (needed for SharePoint 2003) and ASP.NET 1.1.
The decimal is a comma (,). I attached pictures of the setting that works and the one that doesn't.

Do you forget to attach the pictures?

I will test the program on win2003. And could you please try to change the decimal to dot(.) just for a test?

How can I change to a “.”? Should I change to your regional settings? If so, what are they?

Sorry, here are the pics.

My test code:

Excel excel = new Excel();
excel.Open(“c:\negative.xls”);
Console.WriteLine(excel.Worksheets[0].Cells[“D5”].StringValue);
Console.WriteLine(excel.Worksheets[0].Cells[“D6”].StringValue);


The attached file is my test program and file. All returns “(11)”.

The decimal can be changed in regional settings. Please enter the customerize tab.

I was able to see (11) in your file for both cells. So it must be something with my original file. I copied one of your cells into this file (including formatting, in cell k70) and it returns -11. I have attached this file. If you can’t find anything with it, I will have to find a work around for this.

Yes. K70 shows -11 but it doesn’t have the same format in my file. Please check the attached screenshot.

That’s not the way it looks here. See attached. I am going to try to find some other way to do what I am trying to do. Thanks for the help.

That must be something related to language. The same file shows differently in different machines.

Do you use Germany MS Excel? Aspose.Excel is based on English version.

No. We are in Philadelphia. We use US English Excel.

Really a very strange problem. I don’t have an idea why it looks differently in our machines.

You can try to create a brand-new file and copy data and format from this file to see if it works.