0 Replies Latest reply: Dec 8, 2016 6:48 AM by Kevin O'Brien RSS

    Macro to export data as txt filewith customer formatting

    Kevin O'Brien

      Hi,

      I have an external application which requires very specific formatting. I would like to write a macro to export the data into this format.

       

      I am currently export a csv document using the standard export function. I would now like to write my own to export the data as follows:

       

      Current CSV document:

      A, B, C

      0, 1, 2

      2, 2, 5

       

      Required Document:

      var items = [
       
      [A, B, C],
       
      [0, 1, 2],
       
      [2, 2, 5]
      ];


      I'm quite new to writing macros so I'm not really sure where to begin. Can anyone offer advice? In particular I'd like to know how to access the currently selected data within the dashboard and then loop over each row and col.

      Thanks,

      Kevin