PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WM - Android Export (xls, csv or txt)
WM - Android Export (xls, csv or txt)
Iniciado por guest, 21,dic. 2015 09:16 - 1 respuesta
Publicado el 21,diciembre 2015 - 09:16
Hi All,

Good day.
How I can export my data from mobile hyperfile or table to xls/csv or txt format?

Thanks,
Ech
Publicado el 21,diciembre 2015 - 10:06
Hi Ech

I do it by building a string and saving it as a text file, but there may be an easier way.

sMycsv is string // Load the header from a text file (optional, or create in the string) sMycsv =fLoadText("csvheader_assessment.txt") // execute query HExecuteQuery(QRY_Export_Data,hQueryDefault) // read first record HReadFirst(QRY_Export_Data) // process records and make csv string WHILE NOT HOut(QRY_Export_Data) csv is string = QRY_Export_Data.field1+","+QRY_Export_Data.field2+","+QRY_Export_Data.field3 sMycsv = sMycsv+csv+CR HReadNext(QRY_Export_Data) END //save file fSaveText("Export.csv", sMycsv)



Hope that helps

Pete