Export PivotTable as image: source language not respected

Thanks for the answers, but I don’t know which culture should I use.
The workbooks can come from anywhere, so I need to figure out the actual texts displayed.

I would have expected that the Shared String Table would be used by default to retrieve the correct labels.
My purpose is to export the range to an image as close as a screenshot would have done.

Is there a way to achieve that?

@Gradlon,

As suggested in our previous reply, you may customize globalization settings for Pivot Table. Please refer to the document: Customize Globalization Settings for Pivot Table|Documentation

I read it, but i don’t thinks it helps much.
I don’t want to customize the globalize settings, I want to use the default labels that are present in the workbook (visible in the Shared String Table). Or find a way to get the culture of the workbook as it was created.

As said in previous message, I don’t know a priori where the workbooks are from, I just need to create an image that represents what the user is seeing when he opens the workbook in Excel.

@Gradlon,

Let us evaluate your requirements in details and then we will get back to you soon.

1 Like

Hello @amjad.sahi,
Do you have any update?

@Gradlon,

We request some time to thoroughly evaluate the workbook’s source data and determine whether your desired feature can be supported. We have created the following new ticket(s) in our internal issue tracking system and will provide updates in accordance with the terms outlined in Free Support Policies.

Issue ID(s): CELLSNET-59105

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

@amjad.sahi

Thanks for the response and the creation of the ticket.
I don’t know if you need it, but in case it will help you, here is my workbook:
Classeur1.zip (17,4 Ko)

@Gradlon,

Thank you for providing the Excel template, which may assist in evaluating your requirements and figuring out the task. We have recorded it in our database under your existing ticket.

@Gradlon
If customize globalization is not set, we will refresh the pivot tables with English region.
We can not simply reuse current labels in the file because we can not the current table does not contain all labels of Pivot table and what the current cell values represent.

Without region setting and customize globalization , we can not refresh pivot table as your excepted local view.

If you only to export as a screenshot , please remove codes about refreshing pivottable now.

Hi @simon.zhao,

Thanks for the response.
My understanding is that I need to refresh pivottable, otherwise I won’t have the correct formatting. The cells color won’t be set. This is what I experienced, and this is Aspose’s guideline: Exporting pivot table as SVG image results in an image of unformatted cells instead of an image of cells that are formatted as the pivot table is in the excel file - #2 by amjad.sahi

I am unsure to understand why you cannot reuse the current labels in the file. Excel is using them, and correctly renders them when printing, for instance.

Is there a way to get the region setting from the worksheet, as it was created?

@Gradlon
1,If you refresh pivot table in an English environment in MS Excel, you will find these labels will be changed as English labels.
2,There is no region setting in xlsx file.
3,These display texts are value of the cells, not the setting the pivot table. When refreshing pivottables, we will enter labels (such as “Row Labels”, “Grand Total”) to the cells. These local labels should be stored in Excel language packs. Excel will display different labels in different regions.

@Gradlon
If formats are lost without refreshing pivot table in the result svg , please share a sample file, we will check it soon. We can only apply style of pivot table to the cells with inner feature.

@Gradlon
We will auto refresh style without updating data when converting to image in the next version.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-59114

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@simon.zhao

Thanks for the ticket and for your support. I look forward to get the new version!

“If formats are lost without refreshing pivot table in the result svg , please share a sample file, we will check it soon.”
→ I shared a workbook in a previous message of this thread.

@Gradlon,

Yes, we got it already. We will fix the issue soon. Once we figure it out or we have other updates, we will share it here.

@Gradlon
We have supported auto refreshing style of pivot table when converting range to image.
Please check the attached image generated by inner hot fix without explicit calling refreshing PivotTable:

dest.png (4.4 KB)

@simon.zhao
Oh, nice! Thanks a lot for your quick and efficient support.

Looking at the release page for Aspose.Cells (Download .NET DLL Components to Process Excel | Aspose.Cells), I see that a new release seems to be done every month. Should I expect to have this fix in October’s release?

@Gradlon
Yes. We will release the new version 25.10 in the first half of October.

1 Like

The issues you have found earlier (filed as CELLSNET-59114) have been fixed in this update. This message was posted using Bugs notification tool by leoluo

Hi,
I have tested the new version, and I now have the result I was expected.
Thank you for your quick and great support, you can close this topic.