How the problem is reproduced:
1)XLSX file with the chart. Axis titles are absent (deleted or made invisible).
2)Load file into library and call getters on possible chart Titles.
3)save it back.
4)Observe appearance of hidden in original file titles.
Attached file and screenshots; code snippet is below:
public static void main(String[] args) throws Exception
{
final String prefixForModfied = “modified_”;
Workbook workbook = new Workbook(testFileDirectory + testFileName);
Iterator sheetIterator = workbook.getWorksheets().iterator();
while (sheetIterator.hasNext())
{
Worksheet worksheet = sheetIterator.next();
Iterator chartIterator = worksheet.getCharts().iterator();
while (chartIterator.hasNext())
processChart(chartIterator.next());
}
workbook.save(testFileDirectory + prefixForModfied + testFileName, FileFormatType.XLSX);
}
private static void processChart(Chart chart) throws Exception
{
SeriesCollection legendCollection = chart.getNSeries();
for (int legendIndex = 0; legendIndex < legendCollection.getCount(); legendIndex++)
legendCollection.get(legendIndex).getName();
Title tmpString = chart.getCategoryAxis().getTitle();
if (chart.getValueAxis().isVisible())
tmpString = chart.getValueAxis().getTitle();
if (chart.getSecondValueAxis().isVisible())
tmpString = chart.getSecondValueAxis().getTitle();
if (chart.getSecondCategoryAxis().isVisible())
tmpString = chart.getSecondCategoryAxis().getTitle();
if (chart.getSeriesAxis().isVisible())
tmpString = chart.getSeriesAxis().getTitle();
tmpString = chart.getTitle();
}
Hi,
Hi,
Thanks for your posting and using Aspose.Cells for Java.
We have fixed incorrect title issue when save to the xlsx excel file.
Please download and try this fix: Aspose.Cells for Java v7.5.1.2 and let us know your feedback.
The issues you have found earlier (filed as CELLSJAVA-40557) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan