Announcement

Collapse
No announcement yet.

[SOLVED] Export to CSV (tab delimiter)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Export to CSV (tab delimiter)

    Hi,

    Is it possible to modify the current configuration of the csv files that are created with the export option?

    An example...

    Now, when you export a grid to a csv file and open that csv with the notepad, you see each value of each row of the grid between double quotes, and all the fields separated by ";" .....but I would need to generate a csv without the double quotes and separated by tab delimiter instead of ";"

    Is possible to do that?

    If not (in a easy way), I have been thinking to create a button with a php function doing this... but my php knowledge is quite poor. Has anyone did something like this and is able to put me in the right direction?

    Thanks in advance.
    Rgds

    Fernando

  • #2
    Does the next link help you out?

    http://www.matteomattei.com/en/expor...mat-using-php/
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Hi,

      Thank you so much

      I have been digging into it and in the forum, and what I see is that code have to ask again for the SQL query that I have in the grid, that would be a good solution if you want to export the info of a table to a csv (or just columns of that table).

      But, the grid I present in SC, has fields that I need to do an INNER JOIN (but after that, those fileds are not presented in the grid) and other fields created by my own from other tables using the info of query (lookup). So I would need to have access to the FINAL GRID itself to do the export.

      Is is possible?

      Comment


      • #4
        ***But, the grid I present in SC, has fields that I need to do an INNER JOIN (but after that, those fileds are not presented in the grid) and other fields created by my own from other tables using the info of query (lookup). So I would need to have access to the FINAL GRID itself to do the export.

        In fact the grid represents a view on a sql select. So if you are able to extract this sql you can 'reshoot' it on your database within a script behind an exportbutton. Then you just need to walkthrough your dataset and write the fields down separated by your character of choice. To generate the appropiate sql you could try to use the internal sql builder.
        A snapshot to retrieve datasets from sc can be found if you generate a dummy event, then you have snippets on the right. After creating it you just need to cut and paste.

        hope this helps.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Hi,

          Thanks!!... I did that finnally, and everythig went Ok.

          Fer

          Comment

          Working...
          X