Style not right after adding a column and a row

Hi Aspose team

From the scenes we mentioned:
https://forum.aspose.com/t/26598

Our team would like to separate 2 problems to 2 different posts for tracking and make them more specific.

1.The background colors of content are different in the HTML conversion result.

2.The style of header which we add can not be set correctly(Background color, text alignment, text bold) in the result of HTML conversion.

The post above is for Problem #1,
And this post is for Problem #2.

Please check these two problem, and thank you for the help.

Best,
Craig

Hi Craig,

Thank you for creating a new thread for the 2nd part of your inquiry as posted here. Please note, I have tried to optimize your provide code to get the scenario working however, I have noticed that specified style is not being applied to the new column if inserted immediately before the PivotTable of your provided sample spreadsheet. Moreover, PivotTable’s styling is disturbed too. Please note, if I manually insert a new column with Excel application at same location, I can style it as desired. Also, if I manually insert a column at index 0 and process it with code as attached, the result is correct. I have logged an investigative ticket with Id CELLSJAVA-41970 for product team’s review. Please spare us little time to schedule the analysis and revert back with updates as soon as we have completed the preliminary analysis.

That said, please check the attached txt file for the updated code. Please note, there are mainly 2 changes as detailed below.

  • You do not need to set the borders for all worksheet contents before rendering it to HTML because recent revisions of the Aspose.Cells APIs have exposed the HtmlSaveOptions.ExportGridLines property. Setting it to true will render the grid lines in the resultant HTML.
  • You do not need to iterate over each cell to apply the style. You can simply create a range of the cells and apply the style to each and every cell in the range in a single statement.

Hi Craig,


This is to update you regarding the ticket logged earlier as CELLSJAVA-41970. We have analyzed the scenario and we regret to inform that the said problem cannot be fixed quickly. You can move the Pivot Table to a new location while using the PivotTable.move method however, the Pivot Table will not refresh because its source is external, and Aspose.Cells APIs currently do not support to refresh data based on external sources.

That said, we will keep the aforementioned ticket open for now and try to find a way to fix the problem. In case of any progress towards resolving the problem, we will post here for your reference.

The issues you have found earlier (filed as CELLSJAVA-41970) have been fixed in Aspose.Cells for Java 24.8.