WordPress.org

Forums

TablePress
[resolved] Date Problem With csv Import (18 posts)

  1. cmsnet
    Member
    Posted 1 year ago #

    Hi Tobias,

    After testing Tablepress out, I set up a live site and mirrored the setup.

    The problem I am having is: I copied and pasted some dates form an .xls spreadsheet and pasted them into a Tablepress column. I set up the European date formulas but for some reason when you click on the column to sort it nothing happens or if you remove the formula the data is all over the place.

    I have tried exporting the data as HTML, pasting it as plain text into a new spreadsheet, then importing it back into Tablepress as a csv file. I have also tried this by exporting as a csv file.

    If I import the dummy data as a csv from the original test site all the date sorting works fine.

    Any ideas what might be going on?

    Many thanks.

    https://wordpress.org/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

  3. cmsnet
    Member
    Posted 1 year ago #

    Hi Tobias,

    Thanks for your speedy reply.

    I have imported some dummy data back into the test site for you to take a look at: http://www.table.cmsnetdesign.com.au/date-test/

    The Test Date column is the one giving trouble. The other columns I populated by typing them instead of cut and paste.

    I have left the date formula out until you have had a chance to take a look.

    When you click on the Test Date Column it looks like it is sorting by the first digits.When you click on the other date columns its sort it out in some sort of order but not in the way that the Test Date is trying to,

    Also I noticed that excel drops the zero from the first date digit, would this affect the import/export into Tablepress?

    Let me know if you want me to put the European date code on the test page.

    Thanks Tobias.

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    the problem here might be all of those empty cells in that column. If I remember correctly, there must be a date in every cell.

    The leading zero should not be critical, but you could try to tell Excel to export them by changing the data format to "Text".

    And you will of course need "Custom Command" to tell the JS library to use the European dates sorting for this column.

    Regards,
    Tobias

  5. cmsnet
    Member
    Posted 1 year ago #

    Great job Tobias - Thank you.

    The problem was indeed the empty cells.I replaced all the empty cells with: 00/00/0000 and all the date sorting now works.

    With reference to the same link above: for some reason I cant get the DataTables FixedHeader to work on the table.

    I have installed the FixedHeader plugin and pasted the following code into the page:

    [table id=7 datatables_fixedheader="top" /]

    Am I missing anything?

    Thanks Tobias.

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    good to hear that this worked! :-)

    Probably due to copy/paste, some HTML code slipped in that ruins the fonts a little bit and might also influence other things.
    Please go the "Edit" screen of that page, and switch from the "Visual" to the "Text" editor in the upper right corner of the text input field. Then, you should see the Shortcode wrapped in HTML <pre> and </pre> tags.
    Please remove those, so that the Shortcode is by itself on its own line.

    Regards,
    Tobias

  7. cmsnet
    Member
    Posted 1 year ago #

    Hi Tobias,

    Removing the

     and 
    sorted the fonts, but for some reason the header is still disappearing when scrolled.

    Could it be the theme I am using?

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    that's good!

    From what I can see, the FixedHeader is not initialized on the table. Are you sure that you added it to the Shortcode correctly?
    Is the Extension activated in the WordPress plugins?

    Regards,
    Tobias

  9. cmsnet
    Member
    Posted 1 year ago #

    Hi Tobias,

    Yes I can confirm the fixed header extension plugin is installed and activated.

    This is the short code I pasted into the page:

    [table id=7 datatables_fixedheader="top" /]

    I have also checked that the table id is correct.

  10. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    ok, that's strange then.
    If possible, I'd like to take a direct look at this on your site. Could you therefore please create a temporary admin account for me and send me the details via email (the address is in the main plugin file "tablepress.php")? That way, I can investigate this directly. Thanks!

    Regards,
    Tobias

  11. cmsnet
    Member
    Posted 1 year ago #

    Hi Tobias,

    Message on it way with the subject:

    Fixed Header - Login Details

  12. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks! I've received that and just took a look. I replied directly to your email. Basically, it's a mixture of problems between the wrong Extension being installed and the theme JS code.

    Regards,
    Tobias

  13. cmsnet
    Member
    Posted 1 year ago #

    Tobias,

    I consider this case to be resolved.

    Keep up the great work - thank you.

  14. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    no problem, you are very welcome! :-) Always glad when I can help!

    Best wishes,
    Tobias

  15. funfitn
    Member
    Posted 1 year ago #

    Hi TobiasBG

    I love tablepress and would like to use it on my site.
    I am race director and I need to post the results for my races.
    Tablepress changes the time I enter for everyone to a decimal figure....I am late by a week trying to solve this..... while everyone is showing their dissatisfaction on facebook.

    Please help, my time and pace column all changed to a decimal figure

  16. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    TablePress does not change any data, as it doesn't actually now (for example) that a cell contains a date are a time value.
    My assumption therefore is that the CSV file already contains that decimal figure and not the desired time. This is however caused during the export from Excel. To check this, please open the CSV file in a text editor.
    To fix this, you'll probably have to play with the cell format in Excel.

    Regards,
    Tobias

  17. cmsnet
    Member
    Posted 1 year ago #

    I made the error of saving the Excel file as .xls instead of .csv

    When I imported the table into Tablepress it messed up some of the formatting by swapping some of the dates to the US date system.

    After re-saving the Excel file in the .csv format and importing it into Tablepress everything worked fine.

  18. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    yes, that's likely the reason then :-) Good to hear that the CSV format worked! The .xls import is not very sophisticated, so that it probably has trouble with different data formats.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TablePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic