= fn(n){n xor 0xFFFF004B eq 0×0 ? n : fn(n – 0×1)}


Howto: Import data from Excel to joomla table using Kimport v1.5.0

After proper installation of Kimport component for joomla 1.5.x, you can try to manage the data using this component.

There is something you need to do before uploading the excel file to the component. The most important step to do is mapping the data columns to the excel columns. For instance, you probably have a table like this:

example data table

You can read the data structure by typing “describe [your-table-name]” on the command line or GUI-based mysql admin tools. Then you may now construct your excel file. Create a Excel file in Office 2003 (note that Kimport currently recognizes Excel2003), the paradigm of the excel file should look like: (Click the picture to enlarge the picture below)

excel file with a proper paradigm

You can see that the first column of the Excel is reserved to further use,  then the first row have to be IDENTICAL with the columns’ name of your data table. The second row is the data type property of the column. For instance, product_sku should be string, so the data type is written “string”.

Okay, now you know that the excel’s paradigm is to map the data meta information of the actual data table. The yellow high-lined part of this excel means the reserved information. Please also note the “sheet name” below. The sheet name should be the EXACTLY same as the table’s name. After the excel file is prepared, you can proceed to upload the file to the component.

Two steps are need to perform upload:

  1. Select “Kimport” from the top menu “Components”. (click the image below to enlarge)
    step 1
  2. Select the Excel file from the local computer. Then click “Save” on the top-right of the page. (click the image below to enlarge)
    step 2
  3. If upload is succeed, you can see a information notification on the page. (click the image below to enlarge)
    step 3

Easy, huh? But Still need to keep in mind when you arrange the Excel data:

  • The first column of the excel file is reserved.
  • The first row without the first column is mapped to the columns’ name of the data table.
  • The second row without the first column is the data type of the column
  • The sheet name of the excel file should rename to the EXACT name of the data table.

Tags: , ,


21 Responses to “Howto: Import data from Excel to joomla table using Kimport v1.5.0”

  1. max says:

    You’ve done a greate job! Bro!

  2. Koumei says:

    @max: Thanks buddy. :-)

  3. Dave says:

    Good on you!
    If there is an sample Excel file, that would be perfect~!

  4. Koumei says:

    Just download the package on the website.

  5. Margaret says:

    I’ve followed your instructions but get this result. Any suggestions.

    Succeesfully imported 0 rows[3]

  6. Koumei says:

    Seems that your excel is not correct. But did you try the newly post version? I updated on google app host, please get the newly code. If import failed, there will be more hints to help you out.

  7. peter says:

    i too followed the steps. >Succeesfully imported 0 rows[3][4][5][6][7][8][9][10][11][12][13]

    the steps are not that clear. do i have to create a data base table or something? im confused about “mapping the data” part. and how to output the imported data. if you can elaborate on this that would be greatly appreciated. more power.

  8. Koumei says:

    Thanks for you kindly reply…Those days my server is down and the site has been a long time not under administration. Shame on me…

  9. robbert says:

    Whenever I hear, ‘It can’t be done,’ I know I’m close to success.

  10. Nguyen says:

    Why I don’t see the picture

  11. claudio says:

    hi,i can’t find excel example,can you post it?thanks

  12. Lars says:

    I can’t see the pictures in your “HOW TO…”

  13. Koumei says:

    Sorry guys. I just fixed the pictures’ url. :)

  14. i must admit this is one of the most informative posts i have read today. kudos to the author

  15. Aruna says:

    when i import the Excel file , i am getting Succeesfully imported 0 rows[3][4] .. I have created a Table in my database with the data column names .. Is that correct. But nothing has been imported to the table . Pls clarify the doubt..

  16. Koumei says:

    Please note that the version of Excel is 2003, not 2007.(*.xlsx is currently not supported yet)

    Please also note that, column 1 should never contain any content. Row 1 and row 2 are used for meta data (I call them metadata, they are just the mapping description)

    Again, the sheet name should be the table name. Exactly the same table name.

    Last, if you ignore any error information of the web server, you may not be able to see the error message.

  17. Tony M says:

    Hi
    I am learning to build a Joomla Website. My data is mainly tabular data formatted in Excel. I found your Kimport 1.5 article whihe seaching for how to import Excel data into Joomla.
    I downloaded the Kimport zip file but got the following error when trying to add it to my Joomla site:
    JInstaller::install: File ‘C:\wamp\www\mywebsite\tmp\install_4bb758dcc536b\administrator\components\com_kimport\tempdata\readme.txt’ does not exist.
    Can you tell me how to resolve this?

    Many thanks
    Tony

  18. Koumei says:

    Can you just extract the zipped file, and then edit kimport.xml, after that, remove line 19. tempdata/readme.txt, Then zip the whole lot again.

    Sorry about this mistake. The error doesn’t show up before. I think newer version of Joomla strictly interprets the component’s configuration file.

  19. Tony M says:

    Thank you – I’m not too sure how to edit the xml file. I tried to delete the line but could not do it. I will do some research on how to edit xml files and give it a try.
    Thanks for your help.
    Tony

  20. Koumei says:

    Never mind. No harm to give a try :-) . Good lunk mate.

  21. Gert says:

    Hello,
    I have a question: Is there a maximum of rows that can be imported?

Leave a Reply

Profile

  • Koumei Deng's Facebook profile


Submit Your Site To The Web's Top 50 Search Engines for Free!