Hi all,
I've received some great help here not to long ago so i thought i would turn to the community once more
for a for me rather difficult solution.
Ok the situation.
We keep an excel sheet up to date every week. It looks something like this.
ClusterName
Number of Host Total CPU Resource Total Memory Number of VM's Total CPU's Virtualisation degree
Week 1 7 39Ghz 48 GB 53 8 7.57 (53 / 7)
Week 2 7 39Ghz 48 GB 57 8 8.14 (57 /7)
I've also added an excel example.
Now i have a script that comes with all these numbers. What i want is that when i run the script, it adds the next line in the already exisiting excel sheet with all the information.
So it somehow must read at which cell the last entry was and then fill in the next line. I can number the weeks by hand of course, or if this can be automated
as well that would be great. Or something that when you call the script you have to enter the week number might be easier?
Anyone know how i should approach this?
Thanks in advance for any help you guys can give.
Kind regards,
Michiel
I think I would approach this by using the script to Export-CSV and then use a custom macro in your excel sheet which puts the information in. You could have the macro autorun when you open the sheet or have a custom button for it.
For the out-file command you can use an -append switch, not sure if this exists in the export-csv command.
This might be a starting point for you, I'm sure someone else will have a better way though!
Dan