Advertisement
Combreal

exportToDifferentXLSXSheets.ps1

Jun 2nd, 2022
1,223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $data = @('Zero','One','Two','Three')
  2.  
  3. #Install-Module ImportExcel -AllowClobber -Force
  4. Get-Module ImportExcel -ListAvailable | Import-Module -Force -Verbose
  5.  
  6. $data | Export-Excel -workSheetName "Character" -Path "C:\Temp\xlsm\\dataExp.xlsx"
  7. 0..3 | Export-Excel -workSheetName "Numbers" -Path "C:\Temp\xlsm\\dataExp.xlsx"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement