As system admins, we are used to digging through heaps of searching, selecting, sorting, filtering, until we got what we were looking for. My point is, while you might appreciate nicely presented, If we are providing the technical details in paragraph format will usually get bored and things they don’t understand, this what we will do at most of the time. Most of the management peoples like simple and colorful representation like charts. Basically it will be easily understandable without reading long texts.

Below code is pretty basic and there are couple of things which is taken by default like Chart Type (which is Bar chart), Data range used for chart (Since single data set is present), position of the chart etc. Before executing the script, we need the data in a tabular format which is to be used to create a chart in the Excel. Let you create the excel sheet similar like below before we moving to the scripting part.

First let you Open the excel and add a chart details in the sheet as shown below. If required Set the Title and the Save the excel. Finally close the excel.

Full Code :

OUTPUT