我想在xlWorkbook中创建4张纸; private void btnExportExcel_Click(object sender, EventArgs e) { Excel.Application xlApp; Excel.Workbook xlWorkbook; Excel.Worksheet xlWorkSheet; xlWorkSheet = (Excel.Worksheet)xlWorkbook.Worksheets.get_Item(1); // Code Logic }我试过了 Excel.Worksheet xlWorkSheet2; xlWorkSheet2 = (Excel.Worksheet)xlWorkbook.Worksheets.get_Item(2);但没有解决。有人可以帮我吗
1 回答
江户川乱折腾
TA贡献1851条经验 获得超5个赞
我从这里得到的:
Excel.Worksheet xlWorkSheet2;
xlWorkSheet2 = (Excel.Worksheet)xlWorkbook.Worksheets.Add();
这样做四次,您将获得4张纸。
- 1 回答
- 0 关注
- 203 浏览
添加回答
举报
0/150
提交
取消