t0nZ Posted August 31, 2010 Share Posted August 31, 2010 (edited) Hi to all.I wrote a simple script with GUI to convert an openoffice calc sheet into a SqlLite table.The script open an OpenOffice calc sheet file (or a Excel .Xls file, you have BTW to have openoffice installed)and you have to input folder of the sqllite DB, name of the DB and table name.The script aims to be an "universal" converter, the condition isthat the sheet has to be organized in orizontal data rows (records in DB)and the columns of the first row are the names of the fiels.Important: Column limit on the right side and row limit on the down sidehas to be esplicited with the string "endend" in the cellsSo you can use the program to quickly populate varius tables of the same DB with many sheets.Warnings:Launch the script with the sheet (openoffice) closed, and close it after every import.The script don't control if a table already exist, in this case this gives an sql error but the records are added.I include the script and a test xls file formatted for import.I include a preview of the gui.I include also the OOoCom.udf used (and slightly modified) by me ( thanx to user Leagnus) , because there are on the street several udf.Comments and advices are welcome !Edit : re-uploaded the source - some bugfix for errors with sheets with many hundreds of rows.Edit : new version and now you can also set right and bottom limits from the gui with numeric values, and fixed problem with numeric value zero in cellsxls2sqllite.zip Edited September 21, 2010 by t0nZ Link to comment Share on other sites More sharing options...
dfaud Posted July 5, 2012 Share Posted July 5, 2012 Hi, great script ! ... but i have an error : U:mooviideo_devautoit_webtempouniversal spreadsheet to sqlLite converterxls2sqlliteOOoCom_UDF_nsc.au3 (196) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Return $row[$sColumn] Return ^ ERROR ->00:50:56 AutoIT3.exe ended My sheet is 13colx499row. Too big for your UDF ? Thks for the answer. Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now