Benutzer-Werkzeuge

Webseiten-Werkzeuge


epplus

Dies ist eine alte Version des Dokuments!


$epplusDllPath = "C:\Users\manuel.zarat\Desktop\Aktuell\DB Backups\EPPlus.dll"
$excelFilePath = "C:\Users\manuel.zarat\Desktop\Aktuell\DB Backups\Databases.xlsx"
 
Add-Type -Path $epplusDllPath
 
$package = New-Object OfficeOpenXml.ExcelPackage
$package.Load([System.IO.File]::OpenRead($excelFilePath))
 
foreach ($ws in $package.Workbook.Worksheets) {
 
    Write-Output "Arbeitsblattname: $($ws.Name)"
 
    for ($row = 1; $row -le $ws.Dimension.End.Row; $row++) {
        $rowValues = @()
        for ($col = 1; $col -le $ws.Dimension.End.Column; $col++) {
            $cellValue = $ws.Cells[$row, $col].Text
            $rowValues += $cellValue
        }
 
        #Write-Output ("Zeile $row : " + ($rowValues -join ", "))
        Write-Output "$($rowValues[0]) - $($rowValues[1])"
    }
 
    break
 
}
epplus.1724414292.txt.gz · Zuletzt geändert: 2024/08/23 13:58 von jango