DevExpress Document Server访问Excel工作表
10-28
方法/步骤
1可以参考以下代码:
using DevExpress.Spreadsheet;
// ...
Workbook workbook = new Workbook();
// Access a collection of worksheets.
WorksheetCollection worksheets = workbook.Worksheets;
// Access a worksheet by its index.
Worksheet worksheet1 = workbook.Worksheets[0];
// Access a worksheet by its name.
Worksheet worksheet2 = workbook.Worksheets["Sheet2"];2工作表的索引是从零开始的,它用以指定集合内的工作表的位置。工作表的名称在集合内必须是唯一的,它还将展示在工作表选项卡中,下图就是用DevExpress Document Server创建的电子表格在微软Excel中打开的效果。