I am trying to convert the following code to OPEN-XML C#.
Scenario - Template has been created by the user using the XML mapping provided by Ecxel. The following code opens the template and imports the XML data file (dataPath) and saves it as final report. How can I achieve the same thing using openXML SDK. This is because this component is deployed in IIS.
var exApp = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook xlWorkBook = null;
object misValue = System.Reflection.Missing.Value;
exApp.Visible = false;
xlWorkBook = exApp.Workbooks.Open(@"D:\New.xlsx");
Microsoft.Office.Interop.Excel.XmlMap x = null;
xlWorkBook.XmlImport(dataPath, out x, Type.Missing, Type.Missing);
xlWorkBook.Save();
xlWorkBook.Close(true, misValue, misValue);
exApp.Quit();