WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Import Export problem (10 posts)

  1. wpreader
    Member
    Posted 3 years ago #

    I'm running wp 3.2.1 and im having major issues with importing data from a csv file.

    It just doesnt seem to work - the columns and rows dont match at all.

    I've tried to import data in different ways and it's not getting it right.

    I've tried importing the following in csv format and i've had no luck:
    - importing from excel
    - importing from google docs
    - importing files with blank cells
    - importing files without blank cell
    - exporting a table from wp-table reloaded and then importing it again
    - importing just a single row

    Even when importing a single row, all the values just go into 1 cell as opposed to multiple ones. I've tried ',' and ';' seperated csv files.

    Has anyone else had this problem?

  2. Samuel B
    moderator
    Posted 3 years ago #

  3. wpreader
    Member
    Posted 3 years ago #

    Thanks Sam, but that doesnt help too much as this is related to the WP-Table Reloaded plugin.

    Has anyone come across the problem im having?

  4. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    can you maybe upload the CSV file and the original source file (Excel?) somewhere, so that I can take a look at it?

    Regards,
    Tobias

  5. wpreader
    Member
    Posted 3 years ago #

    Hi Tobias,

    this is the simplest form of a csv file as i described above.

    http://wpreader.com/test.csv

    All the fields just end up going into a single cell.

    What are your thoughts? do you have a working csv file?

  6. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    I think I found a possible reason. As it seems, the internally used CSV import library expects that the CSV file as an empty line at the end.

    So, with the file that is currently not working, please try this:
    Open it in a text editor, like Notepad, and move the cursor behind the very last character in the last row. Then press "Enter" there, to add a new empty line to the file and save the file. Try the import again with that file.

    Regards,
    Tobias

  7. wpreader
    Member
    Posted 3 years ago #

    Hi Tobias,

    This still isn't working for me. Do you have a working file that you are able to import successfully?

    Anton

  8. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    yes, here's a file that is working:
    http://tobias.baethge.com/download/plugins/additional/csv-test.csv

    That is the table that you can see in the "Demo" section on the plugin's website.

    Regards,
    Tobias

  9. wpreader
    Member
    Posted 3 years ago #

    Hi tobias, so i think i found a glitch.

    It seems that in the csv file that i was using had empty cells and in some cases this was the first cell in the row and that's what made it not render properly - empty cells.

    The way i fixed it was by adding 1 row and 1 column at the beginning of the table and i made sure that all the cells had values, in my case, i just put an 'x' in all the cells in the first row and column. I then tried to import it and it worked as expected.

    e.g. if my table was this before

    A,B,C,D
    1,2,3,4
    ,6,,8
    ,10,11,12

    i changed to this so that it would import properly:
    X,X,X,X,X
    X,A,B,C,D
    X,1,2,3,4
    X,,6,,8
    X,,10,11,12

  10. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    ah, very nice! Good catch!
    This must be a problem in the CSV import library than... Great that you found a solution!

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic