I get an html file from the content of the HttpResponseMessage
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, myUrl);
var response = client.SendAsync(request);
var content = response.Content.ReadAsStringAsync().Result;
Then I'm trying to create an excel file
using(var Excel = Microsoft.Office.Interop.Excel)
{
Excel.Application xlApp = new Excel.Application();
Excel.Workbook xlWorkbook = xlApp.Workbooks.Open(content);
}
And here I get an error message
Exception from HRESULT: 0x800A03EC
But if I manually copy all content from the response and create a file and then load it as
Excel.Workbook xlWorkbook = xlApp.Workbooks.Open("C:\test.html");
it works perfect. Can anyone explain please is it possible to create a Workbook from html string without saving a file?