Page 1 of 1

Saving DataGrid data to Text Files

Posted: Tue May 07, 2013 1:28 pm
by FinishTheCode
How would I go about saving Datagrid Data to a text file?

Cheers guys :)

Re: Saving DataGrid data to Text Files

Posted: Tue May 07, 2013 1:32 pm
by Klaus
Hi FinishTheCode,

if it is a datagrid of type TABLE, then you can simply export to a text file with:
...
put the DGTEXT of grp "your datagrid here" into url("file:DG_Content.txt")
...
"the DGTEXT of grp xyz" is a TAB and CR delimited text!

Read in:
...
set the DGTEXT of grp "your datagrid here" to url("file:DG_Content.txt")
...

If it is of type FORM, then you will need to convert "the DGData of grp XYZ",
which is an array actually to a string and save that.
Drop a line if that is the case.


Best

Klaus