getPrecedents returns a column 164.. for a dependent cell siutated in column 0

Hello,

see attached project

the getPrecedents returns good column and row reference for D1 formula and returns column 164.. for the formula in D2 cell

could you fix the problem ?

Regards,

Dimitri

Hi,

Thank you for considerting Aspose.

We have tested your sample project with the sample xlsx file provided by you. It is observed that the file attached has some error in it. What we did was, we created a new xlsx file and tested your code the new file and it worked fine.

Code used:

string sValueToShow = "";
textBox1.Text = "";
Workbook CurrentWorkbook = new Workbook("C:\\mytest.xlsx");
Worksheet CurrentWorkSheet = CurrentWorkbook.Worksheets[0];
foreach (Cell c in CurrentWorkSheet.Cells)
{
ReferredAreaCollection dep = c.GetPrecedents();
if (dep != null)
{
foreach (ReferredArea r in dep)
{
if (r.IsArea == true)
{
// do some thing
}
else
{
textBox1.Text += String.Format("({0},{1}) depends on ({2},{3})\r\n", c.Column.ToString(), c.Row.ToString(), r.StartColumn.ToString(), r.StartRow.ToString());
}
}
}
} //End for loop

Thanks,

Hello Salman,

Thanks for the prompt reply.

I'm glad the code is working with your file. However, the file i've provided was created in regular way with Excel. First with Excel 97 compatible version (where the error was the column 254) after that converted to xlsx (and the error became column 1638..).

When we calculate the formula with aspose, it is calculated correctly. Why getPrecedents fails ? Maybe you can find a solution at your side ?

Regards,

Dimitri

Hi,

We found the issue using your project, we will figure it out soon.

I have logged your issue into our tracking system with an id: CELLSNET-19238. Once we sort it out, we will let you know about it.

Thank you.

thank you, I will be waiting for this fix

Hi Dimitri,

Here is the latest version of Aspose.Cells.dll v5.1.2.1 attached with this post. . Please try this.

Thanks,

thank you, it works fine

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.