Match is not evaluated properly

To reproduce used the code below and the attached spreadsheet:


private static void TestMatch()
{
string path = @“C:\temp\spreadsheets”;
Workbook workbook = new Workbook(path + “test_match.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];

workbook.CalculateFormula();

Console.WriteLine("{0}", worksheet.Cells[“A2”].Formula);
Console.WriteLine("{0}", worksheet.Cells[“A2”].Value);

}

The second console.writelineline displays #N/A. It should display 1. The first console.writeline line displays: =MATCH(“Field1”,PIsData[[#Headers],[Field1]],0). If you look at the spreadsheet the formula in the cell is: =MATCH(“Field1”,PIsData[#Headers],0). Aspose added [Field1] to the [#Headers] range which restricts the range to the header of Field1.

Please fix this issue. I tested it against 8.0.2.

Thanks

Hi,


Thanks for the template file and sample code.

I observed the issue as you mentioned by using your sample code with your template file.
The formula is evaluated as “#N/A”, it should display 1. Also, the first console.writeline line displays: =MATCH(“Field1”,PIsData[[#Headers],[Field1]],0) instead of : =MATCH(“Field1”,PIsData[#Headers],0).
e.g
Sample code:

string path = @“C:\temp\spreadsheets”;
Workbook workbook = new Workbook(path + “test_match.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];

workbook.CalculateFormula();

Console.WriteLine("{0}", worksheet.Cells[“A2”].Formula);
Console.WriteLine("{0}", worksheet.Cells[“A2”].Value);

I have logged a ticket with an id “CELLSNET-42677” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

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


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