I have to return a workbook from an html string. I convert the HTML string to a memory stream and then I pass it as a parameter to Workbook(stream, loadOptions).
The problem is that I keep getting this error and I don’t know what I should do: ‘‘utf-8 /><title’ is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
Parameter name: name’.
My code is:
` Aspose.Cells.LoadOptions loadOptions = new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.Html);
System.IO.Stream stream = new System.IO.MemoryStream(ASCIIEncoding.Default.GetBytes(sourceHTML));
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(stream, loadOptions);
return wb;`
The sourceHTML variable is attached to here: sourceHTML.docx (14.1 KB)