Datagrid data to text file
Fredrik Andersson
fredrik at morbug.se
Wed May 13 02:26:09 EDT 2009
Hi,
This is my own newbie solution. Looping through the array I'm
afraid ;) You can probably use the Split/Convert commands (or other
means) to do it a lot more efficiently.
ON mouseUp pMouseBtnNo
put empty into tData
put the dgData of group "DataGrid List" into theDataA
REPEAT WITH i = 1 to the number of lines in the keys of theDataA
put theDataA[i]["Ägr"] & ";" & theDataA[i]["Dnr"] & ";" &
theDataA[i]["Pnr"] & ";" & theDataA[i]["Namn"] & ";" & theDataA[i]
["Påbörjad"] & ";" & theDataA[i]["Avslutad"] & ";" & theDataA[i]
["Text"] & ";" & theDataA[i]["Dagbok"] into tLine
END repeat
put tData into URL("file:" & fld "sökväg" & fld "opid")
END mouseUp
Regards,
Fredrik
13 maj 2009 kl. 07.49 skrev Yves COPPE:
> Hello list,
>
> I want to export the data of a datagrid form to a text file (tab-tab-
> return text file)
>
> I've tried with the dgtext of group "dataGrid 1" but the columns are
> not in the properly order
>
> So I try with the dgData of group "dataGrid 1"
> but it gives me an array data
>
> How can I convert this array data in a text ?
>
> (there are 4 columns in the datagrid and the number of rows is a
> variable)
>
> Thank you very much.
>
>
> Greetings.
>
> Yves COPPE
> yvescoppe at skynet.be
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list