Recent

Author Topic: Create CSV  (Read 4293 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2184
    • Lazarus and Free Pascal italian community
Create CSV
« on: December 06, 2021, 03:11:13 pm »
Hello to all. Can anyone tell me how I can export a csv file to the Download folder? Thanks
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

loaded

  • Sr. Member
  • ****
  • Posts: 430
Re: Create CSV
« Reply #1 on: December 06, 2021, 04:38:19 pm »
Hi ,
lazandroidmodulewizard-master\demos\GUI\AppDownloadManagerDemo1 I think you can do whatever you want with the sample project.
If Ide=Lazarus 2.0.10 32 Bit and Os=Win 10 Home 64 Bit then Get up and do something useful! Because God is the helper of those who start again;

jmpessoa

  • Hero Member
  • *****
  • Posts: 2050
Re: Create CSV
« Reply #2 on: December 06, 2021, 09:04:37 pm »
Quote
how I can export a csv file to the Download folder...

That is,  save some csv/txt content to a  file in device Download folder?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

xinyiman

  • Hero Member
  • *****
  • Posts: 2184
    • Lazarus and Free Pascal italian community
Re: Create CSV
« Reply #3 on: December 07, 2021, 08:39:13 am »
Yes. I test this code. But not create a file.

filename   := self.GetEnvironmentDirectoryPath(dirDownloads) + System.DirectorySeparator + 'abcd.csv';
Self.jListView1.SaveToFile(filename);
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

jmpessoa

  • Hero Member
  • *****
  • Posts: 2050
Re: Create CSV
« Reply #4 on: December 07, 2021, 06:21:08 pm »

Maybe, our app can not save to "public" folder anymore....

The system is imposing new restrictions with each new Android version..

Can you test in some "old" device?

What about jTextFileManager? can you do some test?

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Leledumbo

  • Hero Member
  • *****
  • Posts: 8402
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Create CSV
« Reply #5 on: December 09, 2021, 05:53:22 am »
You need WRITE_EXTERNAL_STORAGE in the manifest these days. Well, depending on the target API.

 

TinyPortal © 2005-2018