Save validator messages (results) to Excel or csv?

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 6
Joined: Mon Oct 08, 2012 9:48 am

Save validator messages (results) to Excel or csv?

Post by armplinker »

I am generating the html report fine, and it is lovely, :D but what I would also like is to generate a 'hit list' of errors (classified) which I can bring into Excel or another tool and just work down to clear all the problems....

Is there a way to emit the messages (with the report URLs as a column, I guess) in a single Excel sheet / table?

Thank you.
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3590
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Save validator messages (results) to Excel or csv?

Post by Albert Wiersch »


You could try using user functions to create a CSV file. There's some example code here: ... eadded.htm

Basically, you can put this code in a text file (recommend a ".cfg" extension):

Code: Select all

function onMessageAdded() {

function onEndedValidation() {
 writeFile('T:\validation_output.csv','csvfilearray',1); // append
Then specify that text file as a user functions file in the Validator Engine Options, 'Validator Engine->Config File' page.

* You'll need to update the filename in the code above (it's currently coded to 'T:\validation_output.csv').
* You'll need to enable potentially destructive functions in the 'Config File' options page so the writeFile() function works
* Every document you validate (including in the Batch Wizard) will then append to the file you specify
* You'll have to manually delete the file to clear/reset it or it will keep appended to it (though you could write a Batch Wizard user function to delete it automatically when you run a new Batch Wizard job).

Hope this helps and gets you started. Please let me know how it goes!
Post Reply