mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-12 14:23:14 +00:00
12 lines
351 B
PowerShell
12 lines
351 B
PowerShell
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
|
|
|
$xlSourcefile = "$env:TEMP\Source.xlsx"
|
|
|
|
Remove-Item $xlSourcefile -ErrorAction Ignore
|
|
|
|
$excel = 1..10 | Export-Excel $xlSourcefile -PassThru
|
|
|
|
Add-WorkSheet -ExcelPackage $excel -WorkSheetname "NewSheet" -CopySource $excel.Workbook.Worksheets["Sheet1"]
|
|
|
|
Close-ExcelPackage -ExcelPackage $excel -Show
|