Java Converter Excel to Pptx auto width

Using Converter
It converts from xlsx to pptx
The xlsx content is truncated and converted.
Is there a way to convert xlsx contents because they are not cut?

[Refer to the JAVA sources]
Converter converter = new Converter(rsltFile.getPath());
PresentationConvertOptions options = new PresentationConvertOptions();
options.setFormat(PresentationFileType.Pptx);
converter.convert(qcReportPptxFile.toString(), options);

[Refer to the image]
[xlsx]

[pptx]

image.png (99.5 KB)
image.png (48.1 KB)

@trew44

I am afraid I could not find Converter Object in GroupDocs.Conversion Cloud SDK for Java. Can you please confirm which converter you are referring in your code?

However, if you are using GroupDocs.Conversion Cloud SDK for Java then you need to set setOnePagePerSheet proerty of SpreadSheetLoadoptions to true as following to resolve the content truncation issue.

....
....
// Prepare convert settings
ConvertSettings settings = new ConvertSettings();
settings.setFilePath("Spreadsheet/sample.xlsx");
settings.setFormat("pptx");
 
SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions();
loadOptions.setHideComments(true);
loadOptions.setOnePagePerSheet(true);
 
settings.setLoadOptions(loadOptions);
settings.setOutputPath("converted");
.....
.....
1 Like

@tilal.ahmad

You used groupdocs-conversion-22.3.jar. (com.groupdocs.conversion.Converter)
I’ve used setOnePagePerSheet(true)
It is not cut like the image below, but it is converted into one sheet.

image.png (15.1 KB)

@trew44

Please share the problematic Spreadsheet and we’ll investigate this issue.

1 Like

220613_090716_ABCDEFG TEST (TEST)_1.zip (3.9 MB)
@Atir_Tahir

I am sharing Excel xlsx file zip file.
Thank you for your interest.

220613_090716_ABCDEFG TEST (TEST)_1.zip (3.9 MB)
220613_090716_ABCDEFG TEST (TEST)_2.zip (3.9 MB)

@trew44

We cannot open the .z02 file at our end. It seems that the ZIP is corrupted. Could you please upload the document without compression on some cloud storage (e.g. Google Drive) and share link here?

1 Like

@Atir_Tahir

It’s my first time sharing a drive
I don’t know if it’s right.

1 Like

@trew44

Thank you for sharing the details. This issue reproduced at our end. Therefore, we’ve logged it in our internal issue tracking system with ID CONVERSIONJAVA-1681. You’ll be notified in case of any update.

1 Like

@Atir_Tahir

Thank you.
Is there a temporary way?

@trew44

The workaround is, count the number of sheets in a Workbook. Then you can convert all sheets one by one (use a loop for this purpose).

1 Like

@Atir_Tahir

Can I get a loop test source?
However, the Excel you shared is already 1 sheet…

@trew44

Sorry for the inconvenience. It will not work.
However, we are still investigating this ticket/issue. You’ll be notified in case of any update.