Riconosci i tag a chiusura automatica

HTML può avere una varietà di tag formattati per tag vuoti come <td></td> o <td/>. Aspose.Cells ora supporta entrambi questi formati mentre prima supportava solo <td></td> come i tag. Questa funzione può essere testata convertendo il file di esempio HTML allegato in un file Excel. Il file di esempio HTML e il file Excel di output possono essere scaricati dai seguenti collegamenti per il test.

sampleSelfClosingTags.html

outsampleSelfClosingTags.xlsx

Codice d’esempio

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Set Html load options and keep precision true
HtmlLoadOptions loadOptions = new HtmlLoadOptions(LoadFormat.Html);
// Load sample source file
Workbook wb = new Workbook(sourceDir + "sampleSelfClosingTags.html", loadOptions);
// Save the workbook
wb.Save(outputDir + "outsampleSelfClosingTags.xlsx");