mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Updates to examples . Minor bug fix to format in Merge-Multiple
This commit is contained in:
@@ -4,8 +4,9 @@ $xlSourcefile = "$env:TEMP\Source.xlsx"
|
||||
|
||||
Remove-Item $xlSourcefile -ErrorAction Ignore
|
||||
|
||||
#Put some simple data in a worksheet and Get an excel package object to represent the file
|
||||
$excel = 1..10 | Export-Excel $xlSourcefile -PassThru
|
||||
|
||||
#Add a new worksheet named 'NewSheet' and copying the sheet that was just made (Sheet1) to the new sheet
|
||||
Add-WorkSheet -ExcelPackage $excel -WorkSheetname "NewSheet" -CopySource $excel.Workbook.Worksheets["Sheet1"]
|
||||
|
||||
#Save and open in Excel
|
||||
Close-ExcelPackage -ExcelPackage $excel -Show
|
||||
|
||||
Reference in New Issue
Block a user