G
Guest
Guys
I am working with an excel workbook and have 99% complete however there is
one line that is keeping me from fully automating this proecess.
Code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks._Open(excelFile, false,
false, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
object sheetFormat = Microsoft.Office.Interop.Excel.XlFileFormat.xlHtml;
String outputFile = @"C:\Program\EnergyReport\EnergySheets.html";
// here is the line
excelWorkbook.SaveAs(outputFile, sheetFormat, Type.Missing, Type.Missing,
false, false, Excel.XlSaveAsAccessMode.xlNoChange,
Excel.XlSaveConflictResolution.xlLocalSessionChanges, false, Type.Missing,
Type.Missing, Type.Missing);
Where I do the "SaveAs" workbook I get a dialog pop-up window that informes
me that I will "lose my customer view, do I wish to continue" I always say
yes and from there on everything is fine.
How can I stop, or via code remove the user interaction with this dialog box?
Thanks
I am working with an excel workbook and have 99% complete however there is
one line that is keeping me from fully automating this proecess.
Code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks._Open(excelFile, false,
false, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
object sheetFormat = Microsoft.Office.Interop.Excel.XlFileFormat.xlHtml;
String outputFile = @"C:\Program\EnergyReport\EnergySheets.html";
// here is the line
excelWorkbook.SaveAs(outputFile, sheetFormat, Type.Missing, Type.Missing,
false, false, Excel.XlSaveAsAccessMode.xlNoChange,
Excel.XlSaveConflictResolution.xlLocalSessionChanges, false, Type.Missing,
Type.Missing, Type.Missing);
Where I do the "SaveAs" workbook I get a dialog pop-up window that informes
me that I will "lose my customer view, do I wish to continue" I always say
yes and from there on everything is fine.
How can I stop, or via code remove the user interaction with this dialog box?
Thanks