title: WPF with C# code that generates HTML that exports to Excel and include images
body: <p>Hello so here is my problem.  I currently have a stand alone WPF application that has a web browser control. I have some code that is in C# that generates an HTML page that I use as the content for the Web Browser.  My issue is that I am trying to export this HTML page to excel and have the images included in it.  This is how I am currently exporting my HTML to an EXCEL file:</p>
  
  <pre><code>  string filePath = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".html";
  
    //Creates an HTML file from the web browser and save it to a temp location
    File.WriteAllText(filePath, GenerateHtml());
  
    //Creates a new instance of Microsoft office interop for using MS Excel
    Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
    //Create a new instance of a workbook
    Microsoft.Office.Interop.Excel.Workbook excelWorkBook = excelApp.Workbooks.Add();
    //Don't Show MS Excel
    excelApp.Visible = false;
    //Open a file at location
    Microsoft.Office.Interop.Excel.Workbook excelWorkBook2 = excelApp.Workbooks.Open(filePath);
    //Convert that file to an XLSX document
  
    SaveFileDialog newSFD = new SaveFileDialog();
    newSFD.FileName = "Report in Excel Format";
    newSFD.DefaultExt = ".xls";
    newSFD.Filter = "XLS Documents (.xls)|*.xls";
    Nullable&lt;bool&gt; result = newSFD.ShowDialog();
  
    if (result == true)
    {
      string fileName = newSFD.FileName;
      excelWorkBook2.SaveAs(fileName, Microsoft.Office.Interop.Excel.XlFileFormat.xlXMLSpreadsheet, Missing.Value, Missing.Value, false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange, Microsoft.Office.Interop.Excel.XlSaveConflictResolution.xlUserResolution, true, Missing.Value, Missing.Value, Missing.Value);
      //Close excel
      excelApp.Quit();
    }
  </code></pre>
  
  <p>Everything exports okay and all the information is there but for some reason there are no images.  The table where the images should be are there and it has place holders where the images should go which is why I am so confused.  If there is anymore explanation required please let me know and I will provide it, otherwise thank you for the help/concern with this issue.</p>