HTML to Excel Worksheets

@afitz,

  1. Thanks for the details. We will evaluate it soon.
  2. The next release, i.e., Aspose.Cells v22.11 (which includes the fix/enhancement) is scheduled to be published in the first half of November, 2022.

@afitz
Could you share a template html file with <0xa0> here? We will check it soon.

Hi @simon.zhao, thank you, but the <0xa0> is not an issue for us, I think there was misunderstanding because it was in the screen shot with the #RANGE bug. What had been an issue was the #RANGE bug that was creating an underscores on the cover page, but it was resolved by removing the html for the Workbook tabs. The only need for the tabs for the Worksheets to work was the xml. Thanks again.

@afitz,

Alright, and thanks for the details.

Hello, we are having trouble putting more than one style in a cell for a Diff report. For example we have a string variable that contains span tags. Some of those tags have a class that is for red color text, and some have a class that is for green color text, and some have a class that is for black color text. We have have also used paragraph tags as well. How can we get different styles within the same table cell to be enforced? For some reason the styles are not being enforced.

@afitz,

Could you please provide sample files (e.g., input file, current output file and your expected output file) and sample (runnable) code that you are using. We will look into it soon.

The issues you have found earlier (filed as CELLSNET-52159) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Show Diff in One Cell.7z (14.3 KB)
Hello @Amjad_Sahi, I got a chance to put a simple example together. We can only get one group of styles per Excel cell into out reports( same typescale, same font, same font weight etc), and we are curious on why the limitations. For example, to create a traditional redline report, we need to show differences in what was added/removed by using different font colors, and font styles: if we have an HTML String with different style classes how can we get those different styles to output in one cell? This example shows a String in the Excel cell, but we will be using a variable that holds a String value with different html styles.

@afitz,

Thanks for the input HTML file, output Excel file and your expected output Excel file.

I have logged your provided artifacts and resource files with your existing ticket “CELLSJAVA-44907” into our database. We will evaluate it and look into it soon.

By the way, you did not provide the source sheet (HTML) file and CSS files. How do you render to Excel file based on input file? Do you set some dynamic HTML strings (with different styles) for the cell(s) in code, please provide your sample code as well.

Hi @Amjad_Sahi, There is an .mht file in the zip, it has the css and html. The file is input as .mht and then my company converts it using Aspose.Cells to excel.
For example when we input a Multisheet .mht file, @simon.zhao from Aspose.cells explained how the file is converted: “When we read MHT file,
1, Check Content-Type: multipart/related; boundary=”----=_NextPart_01D8D1DD.28209070" to get “boundary”
2,Split MHT to html files by boundary and named each html file with the value of “Content-Location”
3,Parse “x:ExcelWorkbook” xml section to get HRef of “x:WorksheetSource”,
4,Gets the html stream of the worksheet by comparing HRef of “x:WorksheetSource” and “Content-Location”
5, Read the data of the worksheet."

We use Velocity in combination with an API within the Single File Web Page, I have omitted the Velocity from the file, and provided an example using HTML in the Excel Cell for simplicity. You will see it- its just using span tags within a td cell, to attempt to get different styles within one cell. We cannot achieve that.

Please let me know if you are not seeing the “xlsx_Redling_example.mht” file in the zip. Thank you!

@afitz,

Thanks for further details and process.

We have logged your details with the ticket into our database. This may help while analyzing your issue.

Once we have new updates on your issue/requirements, we will update you.

Hello,
Checking in on CELLSJAVA-44907 ---- Status : Open
Also I have another question, is it possible to set the worksheet-zoom-factor within the input xml of the template itself?
I see we can do it at the application level Set Worksheet Zoom Factor|Documentation
But it would be nice to customize per input file.
My co-worker said “after some additional testing in the .xlsx report I believe the <x:WorksheetOptions> section where we can define the sheet zoom, freeze panes, and other information for the excel report is not being applied at all. In my example below the following XML tags should employ a freeze pane to the top row and a sheet zoom of 130%. I’m not sure if this would be related to the Aspose processing but in previous XML reports I did this and it would work as defined.”Screenshot 2022-12-14 at 2.39.00 PM.png (13.3 KB)

@afitz
Thanks your info.
We have log it with issue id CELLSJAVA-45029.

Thank you! I’ve got another one for you. What is the best way to code/utilize Row 1 Filter Flag Option? considering our input file is a Single File Web Page .mhtml which gets converted to HTML and then converted to Excel. Screenshot 2022-12-14 at 4.17.46 PM.png (9.0 KB)

@afitz,

Thanks for the screenshot.

We have logged it. We will evaluate it and provide details on it.

Thank you, do you have an issue id for it? All the best.

@afitz,

The id of the ticket is “CELLSJAVA-45034”. We will look into it soon.

@afitz
We check the html generated by old Excel version, Those autofilter info are stored in TD tags
td.zip (318 Bytes)

Please set autofilter data as the above.

Hi @simon.zhao, thank you. I tried your code example, but it did not work. I attached my input .mht file and output Excel .xlsx file. input-outputAutoFilter.7z (9.5 KB)

@afitz,

Thanks for the sample files (MHT and XLSX).

We will evaluate your issue using your sample files and get back to you soon.