Aspose.Cells for Java 17.02.0 Release Notes

Key Summary Category
CELLSJAVA-42009 Support MS Excel 2016 TreeMap Chart New Feature 
CELLSJAVA-42008 Support MS Excel 2016 Waterfall Chart New Feature 
CELLSJAVA-41521 Support Converting Text to Columns MS Excel feature New Feature 
CELLSJAVA-42165 Data loss while copying range with hidden rows & columns to new workbook and converting it to HTML Bug 
CELLSJAVA-42164 Data loss while copying range with hidden rows & columns to new workbook and converting it to HTML - II Bug 
CELLSJAVA-42162 Data loss while copying range with hidden rows & columns to new workbook and converting it to HTML - III Bug 
CELLSJAVA-40251 Save as PDF does not preserve formatting Bug 
CELLSJAVA-42187 Excel formula is not working and shown as “#DIV/0!” Bug 
CELLSJAVA-42184 Concurrent save issue  Bug 
CELLSJAVA-42156 Top and bottom borders of cells are gone while converting to HTML Bug 
CELLSJAVA-42147 Excel formula is not working properly Bug 
CELLSJAVA-42131 Recalculating a number of formulas using Aspose Cells APIs results in “#NUM!” error Bug 
CELLSJAVA-42188 Demo page of math does not load correctly in GridWeb (Java) demo project Bug 
CELLSJAVA-41565 List data validation drop down does not close when reloading data Bug 
CELLSJAVA-42159 PageSetup.BlackAndWhite does not seem to work Bug 
CELLSNET-45106 Bug in try catch and re-throw exception where ExceptionType is changed Bug 
CELLSJAVA-42189 Waterfall chart, when calculate() is called, chart series colors are reverted. Bug 
CELLSJAVA-42160 Logarithmic scale bug in Excel causes Aspose Cells to hang Bug 
CELLSJAVA-42158 Vertical Axis bound values changed while rendering spreadsheet to PDF Bug 
CELLSJAVA-42157 Horizontal & vertical axis bound values changed while rendering Chart to EMF Bug 
CELLSJAVA-42133 Hebrew - Space character is missing in PDF Bug 
CELLSJAVA-42107 Chart is vertically suppressed while rendering to image Bug 
CELLSJAVA-42105 DataTable series are missing while exporting chart to image Bug 
CELLSJAVA-42090 Missing underline in title when chart is converted into image Bug 
CELLSJAVA-42086 Background image in chart is wrong Bug 
CELLSJAVA-42084 The space b/w chart’s axis (hebrew) labels/legend is missing in the output PDF file Bug 
CELLSJAVA-41831 Contents of the rectangle shape do not render while converting spreadsheet to HTML Bug 
CELLSJAVA-42095 Chart has been changed while converting spreadsheet to HTML Bug 
CELLSJAVA-42096 Formula in chart has changed position while converting spreadsheet to HTML Bug 
CELLSJAVA-42169 Excel to PDF conversion - Arabic text is reversed Bug 
CELLSJAVA-42193 Sheet name gets Upper-cased on inserting formula Bug 
CELLSJAVA-42191 Call to updateSelectedValue changes activeSheetIndex Bug 
CELLSJAVA-42181 Protected view after re-saving an XLS file Bug 
CELLSJAVA-42180 Copying a workbook changes the standardHeight Bug 
CELLSJAVA-42177 Formula in custom validation gets missing when workbook is saved in XLS format Bug 
CELLSJAVA-42173 Excel needs to recover file after simple save through Aspose.Cells Bug 
CELLSJAVA-42171 Spreadsheet becomes corrupted after changing the font for the shapes Bug 
CELLSJAVA-42168 Not able to change the font for a few shapes in the collection Bug 
CELLSJAVA-42166 Password protected Excel file is throwing exception on loading Bug 
CELLSJAVA-42163 The size of the destination workbook is almost double the size of the source workbook Bug 
CELLSJAVA-42161 Copying sheets across workbooks changes the formula Bug 
CELLSJAVA-42154 Unable to read the CheckBox’s text value Bug 
CELLSJAVA-42150 GetNames() method is not returning all the names Bug 
CELLSJAVA-40511 The pages of the PDF generated by Aspose.Cells are all black Bug 
CELLSJAVA-42179 NullPointerException at Workbook ctor while loading an HTML Exception 
CELLSJAVA-42174 NullPointerException at Workbook ctor while loading an HTML - II  Exception 
CELLSJAVA-42192 CellsException: Invalid hole size: it must be between 10 and 90 Exception 
CELLSJAVA-42190 Exception: “java.lang.IndexOutOfBoundsException” when loading an XLSX file format Exception 
CELLSJAVA-42185 Exception - ReadElementString only could be called - occurred on opening workbook Exception 

Public API and Backwards Incompatible Changes

The following is a list of any changes made to the public API such as added, renamed, removed or deprecated members as well as any non-backward compatible change made to Aspose.Cells for Java. If you have concerns about any change listed, please raise it on the Aspose.Cells support forum.

Added HTMLLoadOptions.AutoFitColsAndRows Property

This release of the Aspose.Cells for Java API has added the HTMLLoadOptions.AutoFitColsAndRows property which indicates if the API should auto-fit columns and rows while importing the HTML in its object mode. The Boolean type property has the default value as false which means that the cell heights & widths will be imported as they are, however, when the aforementioned property is set to true, the API tries to adjust the column widths and row heights according the contents.

Here is the simple usage scenario of the HTMLLoadOptions.AutoFitColsAndRows property.

 // Create an instance of HTMLLoadOptions

HTMLLoadOptions loadOptions = new HTMLLoadOptions();

// Set the AutoFitColsAndRows property to true

loadOptions.setAutoFitColsAndRows(true);

// Create an instance of Workbook and load HTML while passing

// the object of HTMLLoadOptions class created above

Workbook book = new Workbook(dir + "sample.htm", loadOptions);

Added WorkbookSettings.WarningCallback & LoadOptions.WarningCallback Properties

Aspose.Cells for Java 17.02.0 has exposed the WarningCallback property to the LoadOptions and WorkbookSettings classes in order to get or set the warning callback. Developers have to implement the IWarningCallback interface in order to get custom warnings in their applications.

Here is a simple usage scenario of LoadOptions.WarningCallback property to get warnings when an input spreadsheet contains duplicate named ranges.

 public class WarningCallback implements IWarningCallback

{

	public void warning(WarningInfo warningInfo)

    {

        if (warningInfo.getWarningType() == WarningType.DUPLICATE_DEFINED_NAME)

        {

            System.out.println("Duplicate Defined Names Found as " + warningInfo.getDescription());

        }

    }

}

Here is how to use the custom class defined above.

 // Create an instance of LoadOptions class

LoadOptions options = new LoadOptions();

// Set the WarningCallback property to custom class

options.setWarningCallback(new WarningCallback());

// Load a sample spreadsheet in an instance of Workbook while 

// passing the object of LoadOptions class as defined above

Workbook book = new Workbook(dir + "sample.xlsx", options);

Added Cells.textToColumns Method

Latest revision of Aspose.Cells for Java APIs have exposed the Cells.textToColumns method in order to mimic the Excel’s Text to Columns feature. Excel provides this feature from Data Tools under the Data tab. Please note, in order to split the contents of a column to multiple columns, the data should contain a specific delimiter such as a comma (or any other character) based on which the API tries to split the contents of a cell to multiple cells.

Here is a simple usage scenario to demonstrate the usage of newly exposed API.

 // Create an instance of Workbook and load a sample

Workbook book = new Workbook(dir + "sample.xlsx");

// Retrieve the cells collection of the first worksheet in the sample

Cells cells = book.getWorksheets().get(0).getCells();

// Create an instance of TxtLoadOptions

TxtLoadOptions options = new TxtLoadOptions();

// Specify the separator

options.setSeparator(',');

// Split the data in range B2:B4

cells.textToColumns(1, 1, 3, options);

Added Workbook.getFonts Method

Aspose.Cells for Java 17.02.0 has exposed the getFonts method for the Workbook class. The Workbook.getFonts method returns the list of individual fonts used to format the cells contents of a given spreadsheet. The return type of the aforementioned method is an array of typeFont class.

Following code snippet demonstrates the usage of Workbook.getFonts method.

 // Create an instance of Workbook and load a sample

Workbook book = new Workbook(dir + "sample.xlsx");

// Retrieve the list of fonts used in spreadsheet

Font[] fonts = book.getFonts();

// Iterate the list and write font name

for (int i = 0; i < fonts.length; i ++)

{

	Font font = fonts[i];

	System.out.println(font.getName());

}

Added TxtSaveOptions.TrimLeadingBlankRowAndColumn Property

This revision of Aspose.Cells for Java has exposed Boolean type TrimLeadingBlankRowAndColumn property for the TxtSaveOptions class that indicates whether leading blank rows and columns should be trimmed like Excel does while exporting data to CSV or Tab-delimited formats.The default value of aforementioned property is false. In case the data on the worksheet does not start from the first cell, that is: A1, the Excel application removes the leading blank rows and columns while exporting the data to CSV or Tab-delimited formats, however, Aspose.Cells APIs by default, retain the blank rows & columns for the same sample in order to keep the data location retained if the exported CSV or Tab-delimited files have to be imported back using Aspose.Cells APIs.

Here is a simple usage scenario of the TrimLeadingBlankRowAndColumn property.

 // Create an instance of Workbook and load a sample

Workbook book = new Workbook(dir + "sample.xlsx");

// Create an instance of TxtSaveOptions

TxtSaveOptions options = new TxtSaveOptions();

// Set TrimLeadingBlankRowAndColumn property to true

options.setTrimLeadingBlankRowAndColumn(true);

// Export to CSV format while removing the leading blank rows & columns

book.save(dir + "output.csv", options);

Added BuiltInDocumentPropertyCollection.Revision Property and Obsoleted BuiltInDocumentPropertyCollection.RevisionNumber Property

Please use BuiltInDocumentPropertyCollection.Revision property instead.

Added Shape.TextShapeType Property

The Shape.TextShapeType property gets or sets the preset text shape type from a list of predefined types stored in AutoShapeType enumeration.

Usage Examples

Please check the list of help topics added in the Aspose.Cells Wiki docs: 

  1. AutoFit Columns and Rows while loading HTML in Workbook
  2. Convert Text to Columns using Aspose.Cells
  3. Get a List of Fonts used in a Spreadsheet or Workbook
  4. Get Warnings while Loading Excel File
  5. Read and Manipulate Excel 2016 Charts
  6. Trim Leading Blank Rows and Columns while exporting spreadsheets to CSV format