|
- Sub Opiona() '//函数实例
- Set SH0 = Worksheets("Sheet1")
- SH0.Range("A1:L1048576").ClearContents
-
- ARX = Split("E4,D4,D5,D6,D7,D10,C13,C17,F19,F21", ",")
- IROW = 1
- FileArr = FileAllArr(ThisWorkbook.Path, "*.xls?", ThisWorkbook.Name, True, False)
- For I = 0 To UBound(FileArr)
- Set WB = Workbooks.Open(FileArr(I))
- For Each SH In WB.Worksheets
- If SH.Visible = -1 Then '//隐藏的工作表默认跳过
- SH0.Cells(IROW, 1) = GetPathFromFileName(FileArr(I))
- SH0.Cells(IROW, 2) = SH.Name
- For X = 0 To UBound(ARX)
- SH0.Cells(IROW, X + 3) = SH.Range(ARX(X)).Value
- Next
- IROW = IROW + 1
- End If
- Next
-
- WB.Close False
- Next
- End Sub
复制代码 |
|