We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Need more information on ASPOSE.Cells for java

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.

  1. High memory performance - without out of memory issues
  2. Line Breaks and spacing
  3. Bullets Numbering and Dashes
  4. Formatting - Bold, Italics and Underline
  5. Add a website link by surrounding the normal text
  6. Attachment Single file attachment, Multiple file attachment, Text surrounding the single and multiple attachments.
  7. Font color to the text
  8. Background color to the text
  9. Various fonts- Stancil, Avenir, Times New Roman, etc
  10. Paragraph break
  11. Image upload

@ameykhanolkar,

Thanks for providing us details.

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:
https://docs.aspose.com/display/cellsjava/Cells+Formatting
https://docs.aspose.com/display/cellsjava/Data+Formatting
https://docs.aspose.com/display/cellsjava/Dealing+with+Font+Settings
etc.

Hope, this helps a bit.

As per Aspose Cells Performance Issues with Cell-By-Cell Read/Write there is out of memory issue reported, Could you please provide us the maximum row and column limit and time taken to process the data?

@ameykhanolkar,

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.

HyperLinks not getting exported using setHtmlString()?
I tried setting hyperlink using cell.setHtmlString("<a href=’http://google.com’>google</a>");

@ameykhanolkar,

Thanks for the details.

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:

Workbook workbook = new Workbook();
        Cell cell = workbook.getWorksheets().get(0).getCells().get("A1");
                cell.setHtmlString("<a href=‘http://google.com’>google</a>");
        //cell.setHtmlString("<td height=17 class=xl66 width=64 style='height:12.75pt;width:48pt'><a href=\"http://google.com\" target=\"_parent\">google</a></td>");

        workbook.save("f:\\files\\out1.xlsx");

I have logged a ticket with an id “CELLSJAVA-43038” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

Additionally, I found below styles not getting exported using setHtmlString()?

  1. Line breaks using

    tag are not working
    eg:

    First Line

    Next Line

  2. Bullets(.) unordered list are not working
    eg:

    • First Bullet
    • Second Bullet
  3. Italics using tag are not working
    eg:

    Italics

  4. Font family styles are not working
    eg:

    Arial Black

  5. Paragraph break is not working
    eg:

    First Para


    Second Para


    Third Para

Additionally, I found below styles not getting exported using setHtmlString()?

  1. Line breaks using

    tag are not working
    eg: “

    First Line

    Next Line

  2. Bullets(.) unordered list are not working
    eg: “

    • First Bullet
    • Second Bullet
  3. Italics using tag are not working
    eg: "

    Italics

  4. Font family styles are not working
    eg: "

    Arial Black

  5. Paragraph break is not working
    eg: “

    First Para


    Second Para


    Third Para

Additionally, I found below styles not getting exported using setHtmlString()?

  1. Line breaks using

    tag are not working
    eg: cell.setHtmlString(“

    First Line

    Next Line

    ”);
  2. Bullets(.) unordered list are not working
    eg: cell.setHtmlString(“

    • First Bullet
    • Second Bullet
    ”);
  3. Italics using tag are not working
    eg: cell.setHtmlString(“

    Italics

    ”);

  4. Font family styles are not working
    eg: cell.setHtmlString(“

    Arial Black

    ”);
  5. Paragraph break is not working
    eg: cell.setHtmlString(“

    First Para


    Second Para


    Third Para

    ”);

@ameykhanolkar,

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.

@ameykhanolkar,

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.

@ameykhanolkar,

Please try our latest version/fix: Aspose.Cells for Java v19.10.3(attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose_Cells_Java_v19.10.3.zip (6.6 MB)

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

@ Amjad_Sahi

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 ]

the hyperlink is not created in the excelsheet.

can you please check and suggest.

thanks,
nandan

@nandansingh,

Your code is not right as you are simply setting the string to the cell, see the sample code that works fine as I tested:
e.g
Sample code:

    Workbook workbook = new Workbook();
            Cell cell = workbook.getWorksheets().get(0).getCells().get("A1");
                    cell.setHtmlString("<a href=\"http://google.com\">google</a>");
            workbook.save("f:\\files\\out1.xlsx");  

Let us know if you still have any issue.

Thanks for the reply @Amjad_Sahi

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"

@nandansingh,

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.

Hope, this helps a bit.

@Amjad_Sahi

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?

Sample Code:

Workbook workbook = new Workbook();
Cell cell = workbook.getWorksheets().get(0).getCells().get(“A1”);
String ss2=“website: <a href=“http://google.com”>http://google.com< /a> abcdefg”;
cell.setHtmlString(ss2);

    try {
        workbook.save("H:\\out1.xlsx");
    }
    catch(Exception e){
        e.printStackTrace();
    }

@nandansingh,

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.