We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cell.StringValue resolves incorrectly for one custom formatting

Hello,

We’ve encountered an issue with Cell.StringValue calculation.

In the attached “TestFile.xlsx”, the A1 cell displays the Cell.StringValue as 1", with a trailing " character.

The cell uses the following custom formatting: #,##0"";(#,##0);"- "

We are using Aspose.Cells version 7.7.2.0.

Any feedback will be highly appreciated.

Thank you in advance,
Mihai Andrei
Senior Software Engineer
IBM Romania

Hi Mihai,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue with the following code using the latest version: Aspose.Cells
for .NET v7.7.2.3
. The Cell.StringValue should be 1 instead of 1" for the given cell A1 with the applied custom formatting.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42444.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\TestFile.xlsx”;


Workbook workbook = new Workbook(filePath);

Worksheet worksheet = workbook.Worksheets[0];


Cell cell = worksheet.Cells[“A1”];


Debug.WriteLine(cell.StringValue);


Output:
1"

Hi,


I would like to add further. As we have logged a ticket “CELLSNET-42444” for the issue, so we will investigate it on our end soon. In the mean time, as a workaround, you may try to use Cell.Value attribute instead of Cell.StringValue. I have tested it with your file and it works fine.

Thank you.

Hi,

Thanks for using Aspose.Cells.

Please download and try the fix: Aspose.Cells
for .NET v7.7.2.6
and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-42444) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hello,

We’ve tested against Aspose.Cells 8.0.0.0 and it seems the problem is fixed.

Thank you,
Mihai Andrei

Hi Mihai,



Thanks for your feedback and using Aspose.Cells.



It is good to know that your issue is resolved now. Let us know if you
encounter any other issue, we will be glad to look into it and help you
further.