In Part 3 of this series, I'll explain what to do when you're missing the Office Web Components that are required for creating the charts that I have been demonstrating in this series.
Here's a brief explanation of the symptoms: you try a simple query that will create a chart like the following example:
logparser.exe "SELECT Date,COUNT(*) AS Hits INTO HitsByDay.gif FROM *.log GROUP BY Date ORDER BY Date" -i:W3C -o:CHART -chartType:Line -legend:off -chartTitle:"Hits By Day"
And you get the following error message:
Error creating output format "CHART": This output format requires a licensed Microsoft Office Chart Web Component to be installed on the local machine
More often than not, this simply means that you have Office 2007 or Office 2010, which do not contain the Office Web Components that are used by Log Parser to create charts. Fortunately, you can download the missing components from the following URL on Microsoft's website:
Office 2003 Add-in: Office Web Components http://www.microsoft.com/en-us/download/details.aspx?id=22276
When you run the installation, you will see the following license agreement:
When you check the box to accept the license agreement and click Install, you will eventually receive the following dialog box to let you know that the Office 2003 Web Components have been installed:
Once you have the Office 2003 Web Components installed, you can run the same query successfully:
logparser.exe "SELECT Date,COUNT(*) AS Hits INTO HitsByDay.gif FROM *.log GROUP BY Date ORDER BY Date" -i:W3C -o:CHART -chartType:Line -legend:off -chartTitle:"Hits By Day" Statistics: ----------- Elements processed: 123330 Elements output: 14 Execution time: 0.57 seconds
Note: The above query generates the following somewhat uninteresting chart:
That being said, the point of this blog was to let you know how to get charting back, not how to make pretty charts. I'll save pretty charts for a future blog. ;-]
Isn't this deprecated by Microsoft?
Hi Ryan, if you are asking if the Office Web Components (OWC) are deprecated, then yes - that is true. But unfortunately Log Parser can only create charts by using OWC, so you have to install OWC if you are going to create charts with Log Parser.
why i cannot view the chart after the process is completed ?
hello kitty - can you be more specific? Is the chart image file not being created at all? Or is the chart image file unreadable or corrupt?
I am facing the same issue as by Kitty , The chart is being not created at all even after adding OWC, What can be the issue
I am able to see the chart, look at Log Parser installed location or provide the location for the graph to be created and then find it there - sample query I ran which created the graph against an event table
logparser -i:EVT -o:CHART -chartType:PieExploded3D -chartTitle:"Status Codes" "SELECT EventType, COUNT(*) AS Times INTO Chart.gif FROM Application GROUP BY EventType"