These are projects posted by the students of Dr. Gove Allen at Brigham Young University. These students have taken one semester-long course on VBA and generally have had no prior programming experience

Tuesday, April 13, 2010

Web Table Converter

The Problem
Several times in the course of my employment as a web developer, I have been required to retrieve a relatively massive list from the internet and either convert it into a XML document or insert it into a SQL database. Both situations have caused a fair amount of headache for me. My typical process involved highlighting the table, copying it and pasting it into Excel, and then spending 30 minutes coming up with some crazy set of Excel functions to generate the desired output.


The Solution

I created an Excel workbook and VBA script which will parse a HTML page on the internet and find all of the tables on the page. The user can choose which table to download. After downloading the table to the spreadsheet and making any desired adjustments, the user can choose to either export the data as XML or to insert the table into a MySQL database (given a MySQL server, database, username, and password).


No comments:

Post a Comment

Blog Archive