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

Free Support Forum - aspose.com

Aspose.Cells FindString method not working properly for Cell M11

We have a situation where, Aspose.cells is not working properly ,when we are trying to find a string "Sales Factor" located in cell M11. If we move the value anywhere other than cell M11, it works fine.

This is the line of code used

intstartPos = excelSheet.Cells.FindString(strcell, prevCell, cArea).Column;

cArea range values are passed correctly.

The error its throwing now is - "Object refrence not set to an instance of the Object" .

We are using Aspose.Cells

Version 5.2.0.3

Quick feedback is appreciated

Thanks

Hi,

I am not sure about your complete sample code but it works very well testing your scenario.

Here is the sample code and I have attached the template file too.

Sample code:

Workbook workbook = new Workbook(“e:\test2\findstringbook.xlsx”);

Worksheet worksheet = workbook.Worksheets[0];
CellArea ca = new CellArea();
ca.StartRow = 0;
ca.StartColumn = 0;
ca.EndRow = 100;
ca.EndColumn = 24;
Aspose.Cells.Cell cellfound = worksheet.Cells.FindString(“Sales Factor”, null, ca);
MessageBox.Show(cellfound.StringValue);
MessageBox.Show(cellfound.Name);




I am using Aspose.Cells for .NET (Latest version), please try it. If you still find the issue, give us your sample code same as above and attach your template file. We will check it soon.

Thank you.