c# - How to open Excel in windows 10 at the background without "Save as" -
this code opens excel @ background no issue on windows 7 , 8, on windows 10 pops out "save as" prompt. have idea how can rid of "save as" prompt?
object misvalue = system.reflection.missing.value; xlapp = new excel.application(); //xlapp.visible = false; // not rid of save //xlapp.displayalerts = false; // not rid of save //xlapp.screenupdating = false; // not rid of save xlworkbook = xlapp.workbooks.open(excelfileurl, 0, true, 5, "", "", true, microsoft.office.interop.excel.xlplatform.xlwindows, "\t", false, false, 0, true, 1, 0); xlworksheet = xlworkbook.worksheets.get_item(1);
try this:
excelworkbook.saveas(excelfileurl, accessmode: excel.xlsaveasaccessmode.xlexclusive);
Comments
Post a Comment