- Add-Type -Path .\MiniExcel.dll -ErrorAction Stop
- $excelFile = '.\3.xlsx'
- :label1
- foreach ($shtName in [MiniExcelLibs.MiniExcel]::GetSheetNames($excelFile)) {
- foreach ($dicRow in [MiniExcelLibs.MiniExcel]::Query($excelFile, $false, $shtName, 'xlsx', 'A1')) {
- foreach ($kvp in $dicRow) {
- $kvp.Value
- break label1
- }
- }
- }
复制代码
|