📌  相关文章
📜  vbnet 添加新的 ecel 表 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:56.837000             🧑  作者: Mango

代码示例1
Dim ExcelWorkSheet As Excel.Worksheet = CType(ExcelWorkBook.Sheets.Add(Count:=1), Excel.Worksheet)
'Add(Count:=1) means that 1 additional sheet is added, on top of the existing sheet that is automatically generated

'This defines the sheets sperately, so they may be manipulated
Dim ExcelWorkSheetPasswords As Excel.Worksheet = CType(ExcelWorkBook.Sheets(1), Excel.Worksheet)
Dim ExcelWorkSheetArchive As Excel.Worksheet = CType(ExcelWorkBook.Sheets(2), Excel.Worksheet)