FlexGrid SaveGrid surrounding chr(34) around a string

Posted by: andreas.kren on 20 July 2022, 3:06 pm EST

  • Posted 20 July 2022, 3:06 pm EST - Updated 3 October 2022, 10:21 pm EST

    Hi all,

    not sure if the current version does this

    if I say flex.savegrid to a csv file

    it either adds NO surrounding chr(34) or if I add them myself then see my screenshot what happens

    I however need strings to have ONE pair of aurrounding chr(34).

    How can I achieve this?

  • Posted 21 July 2022, 4:59 am EST

    Hi,

    It is the designed behavior. The extra set of quotes is added to maintain the quotes in the content of the cell. For Example: Suppose the content is “Data”, If you save the content with only one set of quotes and open it in Excel the content will be shown as Data instead of “Data”.

    If you want to save to CSV with each value surrounded by only one set of quotes then you can write your own custom method to create a CSV file. Please refer to the sample attached. If you have any questions, please let us know.

    Regards

    Avnish

    Flexgrid_SaveCSV.zip

  • Posted 22 July 2022, 5:21 am EST

    Hi and thank you for your answer. It s just that I have to replace the (written from a 3rd party) program that creates the csv files. the savegrid method does evth I want except for this behaviour and the resulting csv files are not used by excel but by another program which I am not be able to change…

    however it s not my biggest problem :slight_smile:

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels