GroupDocs.Conversion for Java 23.12 Release Notes

Major Features

There are 5+ features and bug fixes in this release:

  • Automatically fit rows when converting spreadsheets
  • Improved Presentation to Word-processing conversion
  • Implemented retrieving sheets names from a spreadsheet
  • Implemented converting sheets by name from a spreadsheet
  • CsvLoadOptions.ShowGridLines now respected

Full List of Issues Covering all Changes in this Release

KeyCategorySummary
CONVERSIONNET‑6181EnhancementIntroduce AutoFitRows property in SpreadsheetLoadOptions class
CONVERSIONNET‑6317EnhancementImprove Presentation to Word-processing conversion
CONVERSIONNET-6315EnhancementDifferentiate with the Sheet Names when converted excel to html
CONVERSIONNET-6460BugCsvLoadOptions.ShowGridLines does not work

Automatically fit rows when converting spreadsheets

To fit the row content of all rows while converting from a spreadsheet, use the AutoFitRows property of the SpreadsheetLoadOption class.

SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
loadOptions.setAutoFitRows(true);
try (Converter converter = new Converter("sample.xlsx", loadOptions)) {
    PdfConvertOptions options = new PdfConvertOptions();
    converter.convert("converted.pdf", options);
}

Introduced new property Worksheets in SpreadsheetDocumentInfo class.

How to retrieve a spreadsheet sheets names

    String source = "sample.xlsx";

    List<String> sheets = new ArrayList<>();

    try (Converter converter = new Converter(source)) {
        SpreadsheetDocumentInfo documentInfo = (SpreadsheetDocumentInfo) converter.getDocumentInfo();
        sheets = documentInfo.getWorksheets();
    }

Convert a spreadsheet by specifying names of the sheets to be converted

    String source = "sample.xlsx";
    SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
    loadOptions.setSheets(Arrays.asList("Sheet1", "Sheet3"));
    try (Converter converter = new Converter(source, loadOptions) {
        var options = new WebConvertOptions();
        converter.Convert("converted.html", options);
    }

Public API and backward incompatible changes

None