萬盛學電腦網

 萬盛學電腦網 >> Excel教程 >> excel綜合 >> DevExpress Document Server訪問Excel工作表

DevExpress Document Server訪問Excel工作表

   方法/步驟

  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中打開的效果。

DevExpress Document Server訪問Excel工作表 三聯
copyright © 萬盛學電腦網 all rights reserved