Problem while converting xls to HTML

Hi ,


I am using GroupDocs.Conversion for Java 3.0.0 and trying to convert xls file to html.But i see that the image in the HTML does not display the entire excel file and it is truncated.Is it a known issue or am i missing anything.

Below is the code i use to convert the xls file.

HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setOutputType(OutputType.String);
CONVERSION_HANDLER.convert(“C://temp//capbudg.xls”, saveOptions);

Hi There,

We are able to reproduce this issue at our end as well. We have logged this issue in our internal issue tracking system with the ID :CONVERSIONJAVA-169. As we get any update from the concerned team, we will notify you. Please stay tuned.

Best Wishes.

Thanks for the response. May i know whether there is an excel to HTML converter in 1.3 version.


When i tried the below code to convert an excel file to HTML i received the corresponding error.

HtmlSaveOptions htmlsave = new HtmlSaveOptions();
htmlsave.setSaveFileType(FileType.HTML);
try {
String convertedDocumentPath = CONVERSION_HANDLER. convertToHtml(fileName, htmlsave);
} catch (InternalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return fileName;

com.groupdocs.conversion.exception.InternalException: Can’t convert to html!
at com.groupdocs.conversion.handler.ConversionHandler.convertToHtml(Unknown Source)
)

Able to resolve above issue with the following code , but why we need to set the worksheetIndex to 0 .Does Groupdocs converts every sheet into a separate HTML.Is it possible to convert the entire excel with multiple sheets into a single HTML??




HtmlSaveOptions htmlsave = new HtmlSaveOptions();
htmlsave.setSaveFileType(FileType.HTML);
htmlsave.setSplitWorksheetIntoPages(true);
htmlsave.setWorksheetIndex(0);
htmlsave.setSavePath(folderPath + File.separator + fileName);
ByteArrayInputStream is = new ByteArrayInputStream(inputFileByteArr);
try {
String result= CONVERSION_HANDLER.convertToHtml(is,fileName.substring(0,fileName.lastIndexOf(".")), htmlsave);
return true;
} catch (InternalException e) {
LOGGER.error(“Error occurred while converting to HTML”);
} catch (ConversionException e) {
LOGGER.error(“Error occurred while converting to HTML”);
}
return false;
Hi There,
Thanks for posting your query.
Can you please confirm us the version of the API (GroupDocs.Conversion for Java) that you're integrating in your project or evaluating.
We shall appreciate your response.

Best wishes

I am using version 1.3.0 for java. I have already tried with 3.0 ,since it has some limitations as mentioned in the thread i am trying 1.3.0 .



Hello,

Unfortunately we cann't reproduce your issue on our side with our GroupDocs.Conversion for Java 1.3 version. For us the conversion of your capbudg.xls file with the streem works well . Could you please use InputStream instead of ByteArrayInputStream for example:

InputStream in = new FileInputStream(config.getStoragePath() + File.separator + EXCEL_FILE_NAME);

If it will not help you then please share with us your demo project that we can investigate it and find the issue.

We will wait for your results.

---------------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Hi ,


capbudg.xls does not have multiple files. I have attached SampleData.xls which has multiple sheets.But i am not able to convert the entire excel file into a single HTML.Let me know if you can reproduce this with 1.3

Thanks
Hello,

We haven't managed to reproduce the issue with your new file ('SampleData.xlsx'), but unfortunately the legacy version of the library will not convert all worksheets from the document to the one html , it is a bug in the legacy library. This issue is fixed in the new generation of the library, so we recommend you to stay on the new generation of the library because we not support the legacy version anymore .

Note: If you will share with us your demo project that will reproduce your issue, then we will be glad to help you, because with our demo examples we can not reproduce it.

If you will have more questions please feel free to contact us.

---------------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+