Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells APIs have added support for a few Excel 2016 charts by enhancing the ChartType enumeration. The following new fields have been added with the release of Aspose.Cells 17.1.0.
Aspose.Cells 17.1.0 has added a setter for the LoadFilter.LoadDataFilterOptions property to replace the m_LoadDataFilterOptions instance variable. Users may change the LoadDataFilterOptions property in their own implementation of the LoadFilter class to change the behavior of loading template files.
Here is a simple usage scenario.
Java
class CustomLoadFilter extends LoadFilter {
public void startSheet(Worksheet sheet) {
if (sheet.getName().equals("NoCharts")) {
//Load everything and filter charts
this.setLoadDataFilterOptions(LoadDataFilterOptions.ALL & ~LoadDataFilterOptions.CHART);
}
if (sheet.getName().equals("NoShapes")) {
//Load everything and filter shapes
this.setLoadDataFilterOptions(LoadDataFilterOptions.ALL & ~LoadDataFilterOptions.SHAPE);
}
if (sheet.getName().equals("NoConditionalFormatting")) {
//Load everything and filter conditional formatting
this.setLoadDataFilterOptions(LoadDataFilterOptions.ALL & ~LoadDataFilterOptions.CONDITIONAL_FORMATTING);
}
}
}
Aspose.Cells 17.1.0 has exposed the SignificantDigits property from the CellsHelper class, which allows you to get or set the number of significant digits for numeric values in a spreadsheet. The default value of the CellsHelper.SignificantDigits property is 17, whereas it is applicable only if the result has to be stored in XLSX file format.
Here is a simple scenario to demonstrate the usage of the CellsHelper.SignificantDigits property.
Java
//Specify the number of significant digits
CellsHelper.setSignificantDigits(15);
Aspose.Cells 17.1.0 has added the GlowEffect.Color property, which can be used to retrieve the color of the glow effect.
The following snippet makes use of the GlowEffect.Color property.
Java
//Read the source Excel file
Workbook book = new Workbook(dir + "sample.xlsx");
//Access first worksheet
Worksheet sheet = book.getWorksheets().get(0);
//Access the first shape
Shape shape = sheet.getShapes().get(0);
//Read the glow effect color
GlowEffect glow = shape.getGlow();
CellsColor color = glow.getColor();
Aspose.Cells 17.1.0 has exposed PaperWidth and PaperHeight properties for the PageSetup class. The PageSetup.PaperWidth and PageSetup.PaperHeight properties are of type double, representing the paper width and height in inches while considering the page orientation.
Aspose.Cells 17.1.0 has added the CheckCustomNumberFormat property to the WorkbookSettings class. The CheckCustomNumberFormat property is useful for checking if the Style.Custom property has been set properly. In case the Style.Custom property has been set improperly—that is, the value does not correspond to a valid pattern—the Aspose.Cells APIs will throw a CellsException with an appropriate message.
Java
//Create an instance of Workbook
Workbook book = new Workbook();
//Set CheckCustomNumberFormat property to true
book.getSettings().setCheckCustomNumberFormat(true);
//Access first worksheet
Worksheet sheet = book.getWorksheets().get(0);
//Access a cell
Cell cell = sheet.getCells().get("B5");
//Insert a value to the cell
cell.putValue(2347);
//Access cell's style
Style style = cell.getStyle();
//Set Custom property to an invalid pattern
style.setCustom("ggg @ fff");
//Set the modified style to the cell
cell.setStyle(style);
Aspose.Cells 17.1.0 has also exposed the PERCENTAGE field to the DisplayUnitType enumeration. The DisplayUnitType.PERCENTAGE field indicates that the values on the chart shall be divided by 0.01.
This release has removed the m_LoadDataFilterOptions instance variable. It is advised to use the LoadFilter.LoadDataFilterOptions property instead.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.