Forums

Import excel sheet column data in database.

skhn123 10 Jan, 2014
Hello Everyone.😀

I want to ask that is it possible to Add an excel sheet column data to joomla MySQL database with help of chronoform.

i mean like a form with file upload option or something and then when a excel file is selected it automatically create database table name as file name or something(like user defined in a text box) and store its columns tittle's as database columns title's and column content as database fields value.

PS: all i want to do is to create database table and fill its fields from a MS Excel sheet.

if this make sense please do help me.😟
GreyHead 10 Jan, 2014
Hi skhn123,

I don't think that you can do this with ChronoForms by uploading an Excel spreadsheet. What you can do is to save/export the spreadsheet contents to a CSV file and then have a form that will upload that, read it and create a record from each row.

I've done this with ChronoForms but it is mostly hand-coding that is needed, there is nothing built-in that will help you with the processing.

Bob
skhn123 11 Jan, 2014
Thanks bob for quick reply.

oh!! so is their any "how to" available for this from you. please let me know.

thanks.
hayes121 26 Aug, 2014
Just wondering if you got this to work? As i am having the same problem but am unsure how to do it.
GreyHead 27 Aug, 2014
Hi hayes121,

I don't have anything more beyond my previous post. I did this a while ago for a client but it was mostly hand-coded. I used PHP to loop through the lines in the file and write each one to the DB table.

But it is probably easier to do this directly in PHPMyAdmin - there is a MySQL LOAD DATA command that will do this with a csv file (see [url=http://stackoverflow.com/questions/11077801/import-csv-to-mysql-table]this StackOverFlow answerhttp://stackoverflow.com/questions/11077801/import-csv-to-mysql-table).

Bob
hayes121 08 Sep, 2014
sorry to bring back up this thread but i'm having some trouble with this still, I have uploaded it to the myPHPadmin but i don't know how to print this into a form? Or is it even possible to just view the table on the back end of the joomla site rather then going to the PHPadmin every time?

Thanks
Rory
GreyHead 09 Sep, 2014
Hi hates121,

I suggest that you install the AceSQL or MijoSQL components (I think that one is a fork of the other, they are very similar). Either of these will let you work with DB Tables from the Site Admin. Beyond that it depends on what you need to do.

Bob
This topic is locked and no more replies can be posted.