Hi,
i would like to import and export a .csv file (build from B4xtabledata) directly to the Download Folder.
With su.save i can't put it directly to the download folder, so i did SaveAs afterwards.
So the user has to save the file 2 times, he doesn't know why. Is there any other possibility?
The same with import, i want to import directly from download folder..
var.filepath = xui.defaultfolder
Perhaps i didn't get it right ?
Thanks a lot for help
Marion
i would like to import and export a .csv file (build from B4xtabledata) directly to the Download Folder.
With su.save i can't put it directly to the download folder, so i did SaveAs afterwards.
So the user has to save the file 2 times, he doesn't know why. Is there any other possibility?
The same with import, i want to import directly from download folder..
var.filepath = xui.defaultfolder
Perhaps i didn't get it right ?
Thanks a lot for help
Marion
B4X:
' Export .csv
su.SaveCSV2(Var.Filepath,fd.ChosenName, ";", data, headers)
Wait For (B4XPages.MainPage.SaveAs(File.OpenInput(fd.FilePath, fd.ChosenName), "application/octet-stream", fd.ChosenName)) Complete (Success As Boolean)
Log("File saved successfully? " & Success)
' Import
data = su.LoadCSV(Var.FilePath,fd.ChosenName,";")