VMware Cloud Community
guptatarun1989
Contributor
Contributor

Create Sheets in Excel for Output from Muliple Vcenters

Hi all,

  I was wondering to get the data in sheets in a Single Excel if i have to collect data from Muliple Vcenters.

For example  Get-VMhost output in sheet 1 name Vcenter 1  from Cluster 1 , Sheet "Vcenter2 " for Vcenter 2 and so on .

I only Know Export-CSV  $vcenter.csv command but it is giving me seperate excel sheet .I want the data from all the Vcenters in a single Excel workbook with Different sheet for different vcenters

I was wondering any Cmdlet if any in Powercli?

I will be thankful for any help

Tarun Gupta

0 Kudos
2 Replies
Sivaramsharmar
Enthusiast
Enthusiast

Hi Tarun,

After generating CSV files you can combine into single Excel file, you can have a look in to this URL: Powershell Script to combine multiple CSV files into an XLSX file | Real G's Use Ethernet

0 Kudos
LucD
Leadership
Leadership

There is my Export-Xlsx, the sequel, and ordered data post, which provides the Export-Xlsx funtion, in which you will have the option to create multiple sheets.

And there is also Doug's excellent ImportExcel module, which offers this functionality as well.

See Painlessly Get Data from PowerShell to Excel

And it doesn't require you to have Excel installed.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos