Author Posts

July 27, 2016 at 6:18 pm

Hi,
I have CSV file with four columns.
Date time computer timetaken
12/1/2016 11:45 abc 1324
12/2/2016 12:15 bca 5567
12/3/2016 14:06 abc 4446
12/4/2016 17:59 bca 35789
12/5/2016 1:00 van 1256
12/6/2016 13:56 nav 6598
12/7/2016 14:35 van 4478

I want graph for time, computer & timetaken.

I wrote code in VB, but it is getting me only time & time-taken.
Can someone help me in powershell to get grap for time, computer, timetaken?

-Kalyan

July 28, 2016 at 12:08 pm

I'm assuming you're using Excel, and not a CSV file per se. And what you're talking about is Excel Automation. Unfortunately, PowerShell doesn't have any special abilities for Excel. It would have to use the same thing that you're using in VB. Personally, I prefer not to mess with Excel Automation, as I find it complex and finicky. I prefer to use SQL Server Reporting Services for this kind of thing, since it's much easier (for me) and more reliable. We have a free ebook called "Ditch Excel" on our eBooks menu, and you may find that helpful.

July 28, 2016 at 2:00 pm

Hi,
Thanks. Will have a look.

-Kalyan

July 29, 2016 at 3:09 pm

Just thought it should be mentioned that you don't NEED Excel per se. You can also use .NET chart controls and save charts as images to inject into emails. It would depend on what format you are going to provide the report in. I have built charts manually in Excel to get a general idea of what is contained in the chart. Take a look at this:

Tutorial: PowerShell and Microsoft Chart Controls (or How To Spice Up Your Reports)

July 29, 2016 at 7:05 pm

I was going to say that but thought it may be a little over his head.

I can't picture this data in a chart. All the values are unique except the computername.

August 1, 2016 at 4:14 pm

Thanks all.

-Kalyan