Recent

Author Topic: How to make/save an excel file with no data visualization?  (Read 525 times)

Jvan

  • Full Member
  • ***
  • Posts: 181
How to make/save an excel file with no data visualization?
« on: August 09, 2020, 08:31:31 pm »
Namely, I have a JSON and I want to save its data (rows) in an excel file without showing it previously.

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 592
    • Double Dummy Solver - free download
Re: How to make/save an excel file with no data visualization?
« Reply #1 on: August 09, 2020, 08:45:41 pm »
Do you need a XLS file? I think it's a lot easier to work with a tStringlist and then just output a CSV file which, of course, is easily read by Excel.  For example:

Code: Pascal  [Select][+][-]
  1. Var SL : Tstringlist;
  2. begin
  3.   SL := tstringlist.create;
  4.   for i := 0 to 10
  5.     SL.Add('Line,'+inttostr(i)+',Col C');  
  6.   SL.SavetoFile('MyFile.csv');
  7.   SL.Free;
  8. end;


Lazarus 3.0RC2, FPC 3.2.2 x86_64-win64-win32/win64

TRon

  • Hero Member
  • *****
  • Posts: 2503

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: How to make/save an excel file with no data visualization?
« Reply #3 on: August 09, 2020, 08:50:51 pm »
Check the wiki there is an excel exporter.

 

TinyPortal © 2005-2018