Unsupported HTML elements causing issue in excel export

I am working on sample code and will provide you soon. Meanwhile can you confirm if upgrading Aspose.Cells only and no other DLL shall be enough. If you have any sample code, you can provide it too. It shall be helpful. Thanks.

@Bhumika.Shah,

Yes, we recommend using the latest version as we have included many enhancements regarding HTML parsing and rendering. If you still encounter any issues, please provide the necessary information and resource files as requested. We will address your issue soon.

@amjad.sahi

While upgrading pdf I encountered these 2 errors.

Value of type ‘PageSettings’ cannot be converted to ‘PageSettings’.

Value of type ‘PrinterSettings’ cannot be converted to ‘PrinterSettings’.

Kindly please address it soon.

@amjad.sahi

Do you think there are classes added since 23.6.0 which have similar names in System.Drawing.

@amjad_sahi

PdfViewer.PrintDocumentWithSettings seems to be accepting PageSettings and PrintSettings only from Aspose.PDF.Printing and not System.Drawing.Priting any more. Had there been any such change. Can you please confirm.

@Bhumika.Shah,

I am afraid, I can help regarding Aspose.Cells here. I guess your queries/issues are related to Aspose.PDF API. Please post your queries/issues in dedicated forum where one of our fellow colleagues from Aspose.PDF team will assist you soon.

Thanks @amjad.sahi. I have asked it in PDF forum here. Meanwhile as I am going to update ti tomorrow, just wanted to confirm with you, if we upgrade only Aspose.Cells and not Aspose.Words and Aspose.PDF, do you think that should be fine?

@Bhumika.Shah,

I am not sure that just upgrading Aspose.Cells would resolve your issue, as I am not entirely certain about the nature of your problem. If you encounter any issues with Aspose.Cells, we would need your sample project with resource files to reproduce the issue on our end.

Yes upgrading Aspose.Cells resolves the issue. Just that if we dont upgrade Aspose.PDF it should not cause any problem and they both must be independent. While upgrading Aspose.PDF there is another issue.

@Bhumika.Shah
Thank you for your feedback. I’m glad that the cells issue you encountered has been resolved. If you have any questions, please feel free to contact us.

Yes, majority was resolved. Thank you. Though font size 0 or 1 remains. I am trying for sample code but facing some issue. When I will be able to, will surely send you sample code for it. Thanks.

@Bhumika.Shah,

Please take your time to create and compile a sample to reproduce the issue on our end. We will wait and look forward to get your simulation project from you.

There is a serious issue. I don’t think we can upgrade to latest version of Aspose.Cells, as its giving black blackground with black font color with our sample input given earlier.

Test1

image.png (16.1 KB)

Test

image.png (15.2 KB)

Also there comes an additional sheet of “Evaluation Warning” sheet, which was not removed after adding license details somehow.

We will not be able to move forward with the upgradation planned today.

@Bhumika.Shah,

Please provide us a sample project (source code without compilation errors) with resource files to reproduce the issue on our end. You may zip the project with resource files and attach the zipped archive here.

Are you using a valid license to be set in code at the start of your application? You may also debug if the licensing code is processed or not at first.

May I know what the outcome of var in background or foreground should be. Is it removed or replaced with some color.

@Bhumika.Shah,

I am not sure about your scenario, so I cannot evaluate it and therefore cannot comment on it. As requested earlier, kindly provide us with a sample project (source code without compilation errors) and resource files to reproduce the issue. We will then evaluate your code and help you figure it out soon.

No, my question here is if we replace it with any color. It would be not valid. We can only remove those tags. If we replace background with black, font color might have been defined black already OR If we replace background with white, font color might have been defined white already. So, basically there is not point of giving value to any var variable. (Color too is not defined specifically.) We have to only remove them as unnecessary tags. For rgba, it can be understood that we provide black color for rgba(0, 0, 0, 0). But for var(–color-field-bg) and var(–color-field-text), they should have been simply removed.

If you analyze behavior of w3schools website, they are possibly doing the same.

@Bhumika.Shah
Could you post a sample html file which can reproduce your mentioned issues ? We wil check it soon.

@Bhumika.Shah

We have reproduced this issue about font size(0 or 1) as the following codes:

  Workbook wb = new Workbook();
            wb.Worksheets[0].Cells["B2"].HtmlString = "<span style=\"font-size:1px;\">Test</span>";
            wb.Save(dir  + "dest.xlsx");

And log it CELLSNET-55415 in the inner issue system.