日期:2014-05-17 浏览次数:20746 次
Excel.Application xlApp = new Excel.ApplicationClass();
Excel.Workbook xlBook = xlApp.Workbooks.Add(true);
//新建工作表
Worksheet exSheet = (Worksheet)xlApp.Worksheets.Add(Type.Missing, xlApp.Worksheets[xlApp.Worksheets.Count], Type.Missing, Type.Missing);
exSheet.Name = "aaa";
Worksheet exSheet =(Worksheet)xlApp.Worksheets.Add(Type.Missing, xlApp.Worksheets[xlApp.Worksheets.Count], Type.Missing, Type.Missing);即可,
exSheet.Name = "bbb";
Excel.Workbook xlBook = xlApp.Workbooks.Add(true);导致的,但是如果不写这句代码的话就没办法用SaveCopyAs保存啦..