We are planning to buy Aspose.Cells Licence for Java.
Our Requirements:- Convert HTML string text from froala rich text editor and export the rich text in the excel file.
Could you please confirm whether the below points/styles are supported by Aspose.Cells.
High memory performance - without out of memory issues
Line Breaks and spacing
Bullets Numbering and Dashes
Formatting - Bold, Italics and Underline
Add a website link by surrounding the normal text
Attachment Single file attachment, Multiple file attachment, Text surrounding the single and multiple attachments.
Font color to the text
Background color to the text
Various fonts- Stancil, Avenir, Times New Roman, etc
Please note, Aspose.Cells follows MS Excel standards and specifications when rendering HTML files. Aspose.Cells support to create/render MS Excel oriented HTML files. So, when you specify html string (to be parsed by Aspose.Cells), this should be supported in MS Excel or MS Excel should parse it fine otherwise the style won’t be applied. For your information, not all HTML tags or common HTML are supported by MS Excel or Aspose.Cells. Aspose.Cells can parse those HTML tags which are understood/parsed by MS Excel. To evaluate how or which HTML tags are supported. You may open a new file into MS Excel and specify some formattings (set cell’s background color and font color, etc.) and now save the file to “Web Page”. Now open the HTML into notepad and check how HTML tags are generated against your specified formattings. Similarly you may open your HTML file into MS Excel manually and check if formatting or retained when comparing it with displaying into some browser.
We recommend you to kindly do use Aspose.Cells APIs to set your desired rich text formattings (instead of using HTML strings), see the documents for your reference:
This is an older thread which was already addressed. Over the years, we have included many enhancements regarding performance and memory usage. There is no row/columns limit put forth by Aspose.Cells. The limitation itself is enforced by the MS Excel file format that you are using. For example, for XLS file format, you can have 256 columns and 65536 rows in a single worksheet (you can have as many sheets as want in a workbook). For XLSX or other advanced file formats, you can have 1048576 rows and 16384 columns (till column XFD).
You may give it a try to Aspose.Cells and in case, you find any issue, let us know with details and sample, we will check and help you through.
After an initial test, I am able to reproduce the issue as you mentioned. I found HyperLinks are not getting exported using Cell.setHtmlString(). I tested by setting hyperlink using cell.setHtmlString("<a href=‘http://google.com’>google</a>");
e.g Sample code:
I doubt if bullets and numberings are supported when parsing or rendering HTML files. Please note, Aspose.Cells supports MS Excel oriented files which are not common HTML. Aspose.Cells follows MS Excel standards and specifications when parsing or rendering to HTML file formats. So, you may simply test by reading an HTML file (contaning your desired formatted data) if MS Excel displays such a file fine into it. If MS Excel does not parse/read or render HTML file correctly, I am afraid, Aspose.Cells also won’t support it either. If you find MS Excel supports something which is not supported by Aspose.Cells, kindly do create separate threads (one thread per issue) with all the details, sample code and template files, we will check and help you accordingly. Also, by creating separate threads for issue(s), it will be easy for us to manage issues and to consequently figure it out soon.
This is to inform you that we have fixed your issue (logged earlier as “CELLSJAVA-43038”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.
The issues you have found earlier (filed as CELLSJAVA-43038) have been fixed in Aspose.Cells for Java v19.11. This message was posted using Bugs notification tool by ahsaniqbalsidiqui
we are using the Aspose-cellV19.11 but still that hyperlinks is not working properly.
e.g.
//html string is–>google
cell.setHtmlString(“google”)
System.out.println(cell)
output- Aspose.Cells.Cell [ B1; ValueType : IsString; Value : google ]
we have figured out that if there is any space or any other string after the anchor tag () in the string .it is not generating the hyperlink.
e.g.
Workbook workbook = new Workbook();
Cell cell = workbook.getWorksheets().get(0).getCells().get(“A1”);
cell.setHtmlString(“<a href="http://google.com">http://google.com< /a> abcdefg”);
workbook.save(“f:\files\out1.xlsx”);
it is treating the anchor tag string as a normal text.
can you please suggest what needs to be done it our String contains anchor tag along with some other text. like- String s=“<a href="http://google.com">http://google.com< /a> abcdefg”
I tested your scenario/ case using our latest version/fix: Aspose.Cells for Java v19.12.x and it works as expected. See the sample code that I am using with comments for your reference:
e.g Sample code:
Workbook workbook = new Workbook();
Cell cell = workbook.getWorksheets().get(0).getCells().get("A1");
//cell.setHtmlString("<a href=\"http://google.com\">http://google.com</a>");
//cell.setHtmlString("<a href=\"http://google.com\">http://google.com< /a> abcdefg");//it works but whole text "http://google.com< /a> abcdefg" will be hyperlinked - This is same as MS Excel
cell.setHtmlString("<a href=\"http://google.com\">http://google.com abcdefg</a>");//it works with text display as "http://google.com abcdefg".
workbook.save("f:\\files\\out1.xlsx");
Please note, always put your extra text in b/w tags. i.e., ">....</a>", it will work fine.
Hi Amjad,
In our usecase ,the HTML String contains text on both side of the anchor tag like(String ss2=“website: < a href="http://google.com">http://google.com< /a> abcdefg”;). According to the above example whole text will be Hyperlinked.
But our requirement is to only hyperlinked the text which is inside … anchor tag.( like http://google.com).
Can you please suggest is it possible using this version. or how we can do this?
Yes, whole text will be hyperlinked, this is same as what MS Excel does. Even you may create such HTML script in a file and save as “.html”, now open into some browser and you will see all the text will be hyperlinked as well.
For your case, you should split the text, i.e., hyperlinked and additional text in two cells. For example, A1 cell will contain the original hyperlink with valid text upto "</a>". B1 cell will contain other text part. There is no other way around. If you find Ms Excel can do this, let us know with details and sample file, we will check it soon.