Excel 2013 does not display default sheet after adding in C# -
in excel 2013 can't add worksheet after creating workbook. c#-program did this, if set application on visible = true, there no worksheet in it. program can rename sheets, copy sheets, can't show me them. after done in program, need saved, doesnt work, because there nothing displayed can saved!
this code:
excel.application appversion = new excel.application(); appversion.visible = true; excel.workbook databook = excelapp.workbooks.add(); datasheet = databook.worksheets[1]; // <- sheet not visible datasheet.visible = excel.xlsheetvisibility.xlsheetvisible; // not work datasheet.name = seiten[0]; // program continues
after adding workbook excel starts this:
but default sheet? without that, can't save anything. in excel 2010 sheets need appear , can see how program works.
Comments
Post a Comment