• Resolved [email protected]

    (@trevorjordan)


    Hello, Tobias. I am very new to your plug-in which looks as though it will provide all the functionality I need to provide a magazine index for one of my websites. But unfortunately I have fallen at the first hurdle: I have data in a CSV file but when I come to import it into TablePress it comes in as a table with a single column. This happens both with a .csv version and an .xlxs file.

    I realise that I’m probably doing something very silly, and failing to spot something obvious, but I would be most grateful for your help.

    You can see the result of my attempt to load the data on this page in my ‘test bench’ website where I try out plug-ins and themes before committing them to my other sites: https://www.trevorsweb.net/?page_id=838

    The Debug and Version Information is as follows:

    · Website: https://www.trevorsweb.net
    · TablePress: 1.8
    · TablePress (DB): 34
    · TablePress table scheme: 3
    · Plugin installed: 2017/04/02 10:03:24
    · WordPress: 4.7.3
    · Multisite: no
    · PHP: 7.0.17
    · mysqli Extension: true
    · mySQL (Server): 5.1.73-log
    · mySQL (Client): mysqlnd 5.0.12-dev – 20150407 – $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
    · ZIP support: yes
    · UTF-8 conversion: yes
    · WP Memory Limit: 40M
    · Server Memory Limit: 256M
    · Magic Quotes: off
    · WP_DEBUG: false
    · WP_POST_REVISIONS: true

    ————————

    [email protected]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Could you maybe upload the .csv file that lead to this imported table somewhere? That way, I can check if there’s maybe something wrong with the syntax in it.

    Regards,
    Tobias

    Thread Starter [email protected]

    (@trevorjordan)

    Hello, Tobias,

    I’m grateful for your prompt response. I wondered if it was the syntax of my file. The4 link is below.

    Best wishes,
    Trevor
    ——
    The csv file

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Trevor,

    there are indeed problems in this table. From what I can see, the number of columns is not constant (if one counts the comma delimiter characters per line of text, which is what the Import algorithm does).
    The reason for that seems to be that some cell values are not escaped by wrapping in quotation marks ".
    Also, some actual quotation marks (in the HTML for the links), appear as ? instead of " for me (which should then also be encoded).

    Where is this CSV file coming from? Is this really a saved table from Excel?

    Regards,
    Tobias

    Thread Starter [email protected]

    (@trevorjordan)

    Hi. I see the problem. The data came originally from a Microsoft Access database via an export, and some text manipulation in Word which might be where the rogue quotation marks came from. I think I must now revisit the original and do it better! Thank you so much for your time and your courtesy. Yours, Trevor

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, checking if you can correct the format will be the best here. After that, the import should be able to distinguish the columns.

    Regards,
    Tobias

    Thread Starter [email protected]

    (@trevorjordan)

    Dear TobiasAha! And here is the result! A total of 2392 rows, all searchable! What a brilliant plugin!

    https://www.trevorsweb.net/?page_id=838

    Many, many thanks both for the plugin and for your patience and your help.

    Yours sincerely,
    Trevor

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter [email protected]

    (@trevorjordan)

    Hi, Tobias,

    Sorry, but may I presume upon your help for one more tweak? I want to offer just 5 entries on the page to fit the screen better. I can see that it’s a “select/option value” list in the HTML but how can I add the line <option value=”5″>5</option> to the coding?

    Best wishes,
    Trevor
    ——

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Trevor,

    you are referring to the pagination length change, right?

    If you want 5 as the initial value, just use that in the corresponding text field on the “Edit” screen of the table, near the “Pagination” checkbox.

    Regards,
    Tobias

    Thread Starter [email protected]

    (@trevorjordan)

    Hi, Tobias,

    That is exactly it! Interesting thing about coders and coding is that the terms they use and not always entirely transparent to beginners like me! Hence I did not realise, foolishly, that it was the pagination option I needed to change. I’ve now done it and, of course, it’s successful.

    But if you ever get a minute, and I realise that this is all fairly trivial stuff from a beginner, it would be interesting to know if I could change the other options in that select list: I don’t really see that I will ever need 100 rows visible at any time and I don’t really want to give that option to the visitor. But it isn’t urgent.

    Best wishes,
    Trevor

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    good to hear that this helped ??

    Yes, you can edit the other values as well, it requires a bit more coding though. You will need a so-called “Custom Command” (also to be inserted on the table’s “Edit” screen), like

    
    "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ]

    (see https://datatables.net/reference/option/lengthMenu for a bit of documentation).

    Regards,
    Tobias

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Import not creating table’ is closed to new replies.