Problem with formula referencing an image

Hi there,


I have attached an example of a workbook in which there are two images. The image on the right is an image that has been inserted into the workbook, while the image on the left is from an array formula that references the image on the right.

The sample application opens the workbook, changes the image on the right, recalculates the workbook and then saves a copy as an XLSX file and PDF.

You’ll see in the XLSX workbook both images appear the same when opening ‘Output.xlsx’ in Excel. However in the PDF the left image doesn’t update with the new image.

Could you look into this for us?

Thanks

Hi,


I can notice the issue as you have mentioned by reproducing it with the latest version of Aspose.Cells. I will forward these details to our development team for further investigation into this matter. We will get back to you on this once we have an update for you.

Hi,

We have fixed this issue.

Please download and try the latest version: Aspose.Cells for .NET v7.2.2.1

Thanks for the reply.


Unfortunately with this new version we are still experiencing the same issue. I’ve attached the example again, you’ll see that when you run the application both images are updated in Output.xlsx, but only one image is updated in Output.pdf.

Thanks

Hi,


Please add two lines to your code, it will work fine as I tested. Please use v7.2.2.1 fix.

e.g

Workbook workbook = new Workbook(“Input.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];
worksheet.Pictures[0].Data = File.ReadAllBytes(“Info.png”);

workbook.CalculateFormula();

worksheet.Shapes[0].UpdateSelectedValue();
worksheet.Shapes[1].UpdateSelectedValue();

workbook.Save(“Output.xlsx”, SaveFormat.Xlsx);
workbook.Save(“Output.pdf”, SaveFormat.Pdf);


Let us know if you still have any issue.

Thank you.

Hi there,


Thanks for the reply. We now have the first example working correctly.

I’ve attached another example - we are now trying to dynamically select the image based on a cell value. The application will open ‘Input.xlsx’ and save 3 copies as Excel and PDF files, one set with ‘1’ in cell A1, another set with ‘2’ in A1 and another set with ‘3’ in A1.

You’ll see in the Excel files the number in the image changes to match the value in cell A1, but in the PDF files the number in the image is always a 1.

Could you look at this for us?

Thanks

Hi,

Thanks for your reporting.

I was able to see the problem using the latest version using your code.

We have logged this issue in our database. Development team will look into your issue and 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-40779.

C#


for (Int32 i = 1; i <= 3; i++)
{

Workbook workbook = new Workbook(“Input.xlsx”);

Worksheet worksheet = workbook.Worksheets[0];


worksheet.Cells[“A1”].PutValue(i);


workbook.CalculateFormula();


foreach (Worksheet ws in workbook.Worksheets)

{

foreach(Aspose.Cells.Drawing.Shape shp in ws.Shapes)

shp.UpdateSelectedValue();

}


workbook.Save(“Output-” + i + “.xlsx”, SaveFormat.Xlsx);

workbook.Save(“Output-” + i + “.pdf”, SaveFormat.Pdf);

}

Hi,

We have fixed this issue. Please download and use the latest version: Aspose.Cells for .NET v7.2.2.2.

It was caused by dynamic named range.

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


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