skip to content

 Web design 

Database-driven systems

Easy-to-maintain web sites



Excel_to_db is a utility that I have developed as a tool to extract the data from excel spreadsheets and insert that data into a MySQL database table. It does similar things to PHPMyAdmin and other MySQL utilities with respect to uploading into a database table with the following additional capabilities:

  • Database & Table Selection
    Based on a parm module that you provide, it will allow the user to select from all databases and tables under a particular ID, a selection of tables from one database or just one table. Thus, it can be used by the developer for database maintenance or it can be given to a user to upload one or more tables. A single installation can have multiple parm files so you can be using it in various ways for yourself and multiple users. 
  • Spreadsheet (Worksheet) Selection
    The program opens a standard selection panel to choose a (excel) file. The program matches the tab name with the name of the database table and reads the appropriate tab. Thus, if you set this up for a user, as long as one of the tabs has the name of the table, that will be automatically chosen. The Workbook can have other tabs for notes, instructions or parms. The extract of the excel data uses php-excel-reader and that is capable of resolving references to fields in other worksheets within the workbook. Thus, you can have one or more sheets all referencing another sheet that contains parms. This can be a very handy way to structure a workbook that will be updated by a user.
  • Compare
    The current version does a simple line by line compare of the spreadsheet with the database table and reports lines that are different. The biggest value in this is to ensure that the spreadsheet that you are using is in sync with the database table before you make further changes.
  • Upload
    You can upload your spreadsheet data into the database (one worksheet / table at a time). It can clear the existing data or it can insert new data. Unlike other similar utilities, it doesn't need to have the columns in the same order and it can even cope with columns that have been added or dropped. In that case, it will make the appropriate changes to the database table.




Powered by Website Baker,
Design by Innovations Design based on a template by gavjof