jQWidgets Forums

jQuery UI Widgets Forums Grid CSV File format

This topic contains 3 replies, has 2 voices, and was last updated by  riegel 12 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • CSV File format #7436

    riegel
    Member

    I am trying to get specifications on the exact flavor of CSV the grid widget expects? So far it doesn’t appear to support my csv which is formatted like this…

    “John”,”Hello, I am looking for CSV.”,”This has a ^”, and a
    newline”
    “Billy”,”This has a ^” in it.”,”empty,space”

    Notice the quotes are used to delimit each cell and the caret escapes the quote symbol.

    Would it be possible to modify the code to expect CSV like this?

    Thanks for any help.

    Terry Riegel

    CSV File format #7438

    riegel
    Member

    I can modify my CSV to match whatever the grid widget expects. So my question is how do I escape special characters like a comma using the CSV format?

    Is there a place I can look at the code unobfusacted.

    Thanks,

    Terry

    CSV File format #7441

    Peter Stoev
    Keymaster

    Hi Terry,

    The Grid widget expects CSV formatted like that:

    Internet Explorer, 33.3
    Firefox, 26.5
    Chrome, 25.4
    Safari, 7.0
    Opera, 4.6
    Other, 3.2

    The built-in CSV functionality does not support escaping of special characters. I will create a new work item about enhancing the feature with the requested additions.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    CSV File format #7452

    riegel
    Member

    At character 16276 in jqxdata.js I replaced


    m[p]=n

    with


    m[p]=n.toString().replace(/{COMMA}/g,',').replace(/{LF}/g,'\n');

    Then I just send my csv with {COMMA} and {LF} in place of actual commas and line feeds.

    Perhaps this will help someone else.

    Terry

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.