jQWidgets Forums

jQuery UI Widgets Forums TreeGrid Comma in CSV field

This topic contains 3 replies, has 3 voices, and was last updated by  michaeltangen 10 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Comma in CSV field #51951

    archerian
    Participant

    Hi,
    I have .csv data to use as data for a jqxtreegrid. One of the fields is icon, and the field is like this ->

    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPYxgFBMB/BgMgdgDTJIH/DAIMfxm2A2kE/MtwHEhqQFUQAH8Z9sM1IsO/DNeBJAdUFQ7wj8ECrgE7DICqxAH+MWQgKcYGG6AqcYB/DB5IirHBBKhKHADkx78M9+HKkeFfhu9AUgKqEg8AhcNfhudwjTDN/xgioCqIAKCo/MdQAKQboDQRNg9BwMAAALWycnt1PgVKAAAAAElFTkSuQmCC

    Since it has a comma after base64, it is being interpreted as a separate field. Is there a way to ‘escape’ it, maybe with double quotes for the field?

    Thanks,
    Arun

    Comma in CSV field #51954

    Peter Stoev
    Keymaster

    Hi Arun,

    If you update your csv file and the value to be in ” “, then there would be no problem.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Comma in CSV field #51958

    archerian
    Participant

    I tried using ” “ and “” but its stopping after the embededed comma in the field. I also tried escaping it with \. I edited the csv treegrid example and added a comma in one of the employee names. No luck

    Comma in CSV field #67678

    michaeltangen
    Participant

    Has there been any action on this? I can’t seem to find any working solution for escaping comma values in CSV files. I’ve tried tab delimited text, and that didn’t work either. One comment where a sample is referenced, the source CSV file has no example of commas in the content besides that of the delimiters. Is there a way to modify the source code to use tabs \t as the delimiter instead of commas? This would alleviate the issues I’m having with column content that contains quotes (and there’s no way I can get around this). I either need a way to escape the quotes (the standard seems to be enclosing the content in quotes) or to choose another method of delimiting.

    Disregard…. I just noticed the datatype: “tab”.

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

You must be logged in to reply to this topic.