Picture based on Named Cell Reference

I have a problem with images and Named cell reference.


We load an excel document in Aspose and “export” it with the SheetRender as XPS (the short version), everything works fine. Now i have a small problem with an Image that has a Named (Excel Name Manager) Reference, the image isn’t refreshing if the data changed.

Already found a topic about pictures and References, i tried the solution in that topic but it isn’t working: "WorkSheet.Shapes.UpdateSelectedValue()"

I don’t have a sample project, only an example excel document, the first page has an image that changes if the data on the second sheet(“Datenbasis”) changes. The third sheet contains all the images and the corresponding data. So pick one of the cells in column A, copy it to the second sheet in a2 and the picture on the first sheet changes. In the Name Manager you can find all the formulas. This works fine in excel, not in Aspose.Cells (7.5.2.0)

I hope someone can help me even without an example project.

Thanks in advance,

Willem-Jan

Hi Willem,


I think you may try to use Workbook.CalculateFormula method before rendering the Sheet image. Please try it after editing your contents or image’s data and before rendering to XPS or other file formats.

Let us know if you still have this issue.

Thank you.


Thanks for your reply,


before rendering the sheet image i use _Workbook.CalculateFormula(true), right after that i render the Sheet image. Before the CalculateFormula i tried to update the shapes with Shapes.UpdateSelectedValue(); The CalculateFormula(true) works fine for all other references but somehow not with the Image reference.

Willem-Jan

Hi,


Could you share your sample code (runnable), we will check it soon.

Thank you.

i will try to make an example project, its a bit complicated.



Hi,


Sure, we will be waiting for your sample code / sample console application (runnable) to reproduce the issue on our end. I think you may try to create a simpler example for the issue, it will help us to efficiently evaluate your issue to figure it out soon.

PS: We recommend you to please download and try our latest version/fix : Aspose.Cells for .NET v7.5.3.4


Thank you.

Hi,


it was easier than i thought, attached is the example project. I also included in the zip file two excel files:“ImageReferenceTest.xlsx” in this document the images are on two Sheets, “ExcelImagesFilterTest.xlsx” in this document all the images are on the same sheet.

In the example project you have to adjust the used path’s for loading and saving the documents. The program opens an excel document it changes the data of one of the cells, then its exported as xps and xlsx. As you can see the first image are not the same in the exported documents. This occurs with both excel sheets i included.

Willem-Jan

Hi,


Thanks for the sample project with template Excel files.

After an initial test, I observed the issue as you mentioned by using your sample project with your template file(s). The picture is not updated in the first sheet in the output XPS file, it works fine though in the output XLSX file. I have logged a ticket with an id “CELLSNET-42059” for your issue. We will look into your issue soon.

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

Thank you.

Thanks for your fast reply and for your help.


I’m looking forward for an update, i’m on holidays the next two weeks so i won’t reply in that time.

Willem-Jan

Hi Willem-Jan,


No problem, you may enjoy your holidays. In the mean time, if we are able to figure out your issue, we may update you in this thread or provide a fix in this thread. You may get it/download it when you will come back to work from holidays.

Thanks,

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue.

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

Hi,


Thanks, it works! That was really fast!

Willem-Jan

Hi Willem-Jan,

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest fix. If you encounter any other issue, please feel free to post, we will be glad to help you further.

Hi Willem-Jan,


Now that we have also released our next official release of the product: Aspose.Cells for .NET v7.6.0
You may also download and try this version which includes the (functionality of the) fix (v7.5.3.5).


Thank you.