I am trying Aspose cells before our company buys this product. I am trying to export 2 tables from an html to ONE Excel sheet with TWO sheets (one table in each sheet).
Hi,
Good thing is that I got confirmation from my company to buy the production IF it fulfills our requirement.
My Requirement: I have to just pass one String which contains the html string while calling Aspose methods/API (NOT the path of xyz.html). I have 6 different tables which will be divided into 3 sheets in ONE excel And my out put should be exact as it is in html table including bold, italic, color, strike through, font size etc. I know back ground color is not possible. Also numbering is not possible. but at least it would be great if all numbering can come like this
1. something
2. something else
Example of ONE Table cell:
=====================================
This Customer is black listed for below reasons.
- Not paid monthly payment
-
Did not reply to email
- On Monday April 01
- On Tuesday April 02
Hi,
Hi,
String strHtml = "<!doctype html public “-//w3c//dtd xhtml 1.0 transitional//en” “http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd”>\n<html xmlns:v=“urn:schemas-microsoft-com:vml”\nxmlns:o=“urn:schemas-microsoft-com:office:office”\nxmlns:x=“urn:schemas-microsoft-com:office:excel”\nxmlns=“http://www.w3.org/TR/REC-html40”>\n\n\n<meta http-equiv=Content-Type content=“text/html; charset=utf-8”>\n\n<meta name=Generator content="Aspose.Cell “>\n<link rel=File-List href=“p_files/filelist.xml”>\n<link rel=Edit-Time-Data href=“p_files/editdata.mso”>\n<link rel=OLE-Object-Data href=“p_files/oledata.mso”>\n\n\n\n\n\n\n\n\n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n<![if supportMisalignedColumns]>\n \n \n \n <![endif]>\n
<font class=“font18”>This Customer is <font class=“font20”>black listed<font class=“font18”> for below reasons. |
<font class=“font19”>1. Not<font class=“font18”> paid <font class=“font21”>monthly payment |
2. Did not reply to email |
Our customer relation officer tried to contact many time: |
On Monday April 01 |
<font class=“font18”>On <font class=“font19”>Tuesday<font class=“font18”> <font class=“font23”>April<font class=“font18”> <font class=“font24”>02 |
//Get byte array of string
byte[] btsHtml = strHtml.getBytes();
//Create byte array input stream from the byte array
ByteArrayInputStream baisHtml = new ByteArrayInputStream(btsHtml);
//Create html load options
HTMLLoadOptions opts = new HTMLLoadOptions();
//Create workbook from your HTML string
Workbook wb = new Workbook(baisHtml, opts);
//Save the workbook in output format
wb.save(dirPath + “outputHtmlString.xlsx”);
Thanks a lot for your quick reply. I see there are so many \n\n and you have put everything in one line. As I said I need to have multiple sheets. Here I am attaching one sample html. And I tried to have three sheets in on Excel and to put the tables in corresponding sheets. But I am getting wired err/exception.
Thanks for the suggestion. I will try that. But before that I tried to covert one single tab into excel. which doesn’t give me expected output. Attached is the html. Note: I have fomatted text (bold, italic etc) in one single TD.
Hi,
- CELLSJAVA-42259 - HTML could not be converted to Excel file properly
Thanks Shakeel. Is there any update?
Hi,
- CELLSJAVA-42259 - HTML could not be converted to Excel file properly
The issues you have found earlier (filed as CELLSJAVA-42259;CELLSJAVA-42256) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.