Free Support Forum - groupdocs.com

Option to skip empty rows and columns when converting an excel file in Java

a while back we had a bug that dealt with empty rows in excel spreadsheets. ya’ll provided a fix for that by creating a new method off PdfSaveOptions.getCellsOptions() called setSkipEmptyRowsAndColumns().

in the latest groupdocs-conversion the PdfSaveOptions does not have a getCellsOptions() method defined on it and i can’t seem to locate where the setSkipEmptyRowsAndColumns() call has gone.

can you point me in the right direction?

thanks,
-bk

@bkirkby,

Are you facing this in GroupDocs.Conversion for Java 19.6.3?

yes. 19.6.3. it’s also true for 19.6

@bkirkby,

CellsLoadOptions loadOptions = new CellsLoadOptions(); 
loadOptions.setSkipEmptyRowsAndColumns(true); 

Using code above, you can skip empty rows and columns. Then you have to pass loadOptions to convert method.

ConvertedDocument convertedDocumentPath = conversionHandler.<String> convert(guid,loadOptions, saveOption);

Please let me know if this resolves your issue.

1 Like

seems to be working. thanks!

1 Like

@bkirkby,

You are welcome.