HTML tag parse with using importtable method

Hello,

We’re using Aspose.Cells 8.5.2.0 . We are creating excel file from a datatable. For that we’re using Cells.ImportDataTable method. But sometimes datas can contains html tags and we want to parse them in cell. Also we’re not able to know which row/column contains html tag. I know we can parse html tag by using cell[“XX”].HtmlString.

Is there any way to parsing html tags with using ImportDataTable method?

Also i tried like this but it not resolve my issue, probably i’m using it wrong.

Aspose.Cells.HtmlSaveOptions op = new Aspose.Cells.HtmlSaveOptions(Aspose.Cells.SaveFormat.Xlsx);
op.ParseHtmlTagInCell = true;
excel.Save(WebContext.CurrentHttpContext.Response, fileName, Aspose.Cells.ContentDisposition.Attachment, op);

Hi Ahmet,


Thank you for contacting Aspose support.

I am afraid, the current implementation of Aspose.Cells APIs do not provide any means to directly parse the Html tags when data is being imported in bulk such as using Cells.ImportDataTable. However, you may use Cell.HtmlString to set individual cell’s contents with Html tags that will be automatically parsed when resultant spreadsheet is loaded with Excel application.

As you have mentioned that Cell.HtmlString property will not help in your scenario because you may not know which cell contains the Html tags so we can provide a property for the ImportTableOptions class which upon setting will direct the API to set the Html tags to Cell.HtmlString. Please note, if this fulfills your requirement, you have to use the Cells.ImportData method that could import the data from a DataTable while accepting an instance of ImportTableOptions class as well.

Please confirm on this so we could move forward to log a formal request in this regard.

Hi,

Thank you for your answer. Yes we can use ImportData method with ImportTableOptions. It’ll fulfills our requirement.

Kind Regards,

Hi Ahmet.


Thank you for the confirmation.

We have logged your request as CELLSNET-44084 in our database for product team’s review. Please spare us little time for proper feasibility analysis. As soon as we have any updates regarding the feature request, we will post here for your kind reference.

Hi again,


This is to inform you that we have implemented your required feature. We will shortly share the next build of Aspose.Cells for .NET API along with the details of newly added API once we have ensured the quality and incorporated other enhancements.

Stay tuned!

Hi,

Please try our latest version/fix: Aspose.Cells for .NET v8.6.2.3

We have fixed your issue now. Please try ImportTableOptions.IsHtmlString option.

Let us know your feedback.

Thank you.

Hello,

Sorry for the late response. I’ve finally tried it. Its works well based on my tests. Thank you for your help.

Kind regards,

Hi Ahmet,


Thank you for the confirmation. It is good to know that you are up & running again. Please feel free to contact us back in case you need our further assistance with Aspose APIs.

The issues you have found earlier (filed as CELLSNET-44084) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.