Excel to JS/SQL

Excel to JS/SQL.jpg

2013. Personal. C#. Desktop App.

Motivation. I have been slowly expanding on writing learning-another-language apps (see Thai Typing and Thai Sorting) and realized I needed to keep information in some kind of database or spreadsheet. It is said that you should write scripts instead of hand-coding repetitive things. So, I opted for a spreadsheet because it's more portable and wrote a C# desktop app to parse the spreadsheet and generate code. I could have done without a GUI, but I haven't written a desktop app with a GUI before and decided to have some fun with it. The JavaScript code that is generated is the same as the glyph object in Thai Typing. The SQL(ite) code that is generated populates a database with nearly the same columns and rows as the spreadsheet.

Technology. I could have done a command-line interface, but opted to create a Windows Form Application in C# to make a nice GUI and play a bit with it. I connected to the spreadsheet via OLEDB. The generated JavaScript code was checked against existing code (using a diff program). The SQL(ite) code was executed in a SQLite database (I am aware that the query would be different in another database like MySQL).