What is a (better) replacement for CSV-data?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Francesco77
Posts: 40
Joined: Mon Nov 16, 2020 8:16 pm

What is a (better) replacement for CSV-data?

Post by Francesco77 »

For my first LC-project I need a lot of data in form of vocabulary items etc.

I started to collect these data in MS-Excel which is quite convenient for gathering big amounts of data.
I then export these data in CSV-format and import it into LiveCode.

When learning how to do this I read a lot about the csv-format being obsolet and that it should not be used if possible.
Someone in this forum compared the csv-format with polio which should be eradicated :wink:

Since I do not know much about data-formats, data tables or data grids I have no idea which data-format would be better than CSV.

Which other format is recommended for the use with LiveCode?
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: What is a (better) replacement for CSV-data?

Post by Klaus »

Buonasera Francesco,

here a good read and a CLEVER script to overcome some inconveniences of Csv:
https://www.fourthworld.com/embassy/art ... t-die.html :-)

The best thing is to use CSV but actually saved as TSV (TABULATOR separated values).


Best

Klaus
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10504
Joined: Wed May 06, 2009 2:28 pm

Re: What is a (better) replacement for CSV-data?

Post by dunbarx »

@Francesco

Hi.

What Klaus said.

CSV is problematic because commas are common characters in any dataSet, and you do not want common characters to be your delimiters. I never allow them.

Can't you keep and export your data from Excel as Tab and Return delimited text? This is what Klaus was recommending. Why, unless your data comes from another source that way, do you ever need to use CSV? And if it does, immediately replace every comma with tab.

@The whole world. Anyone have a valid reason to prefer CSV, even if you have to read data in that format?

Craig
SparkOut
Posts: 2986
Joined: Sun Sep 23, 2007 4:58 pm

Re: What is a (better) replacement for CSV-data?

Post by SparkOut »

dunbarx wrote: Tue Jan 19, 2021 9:11 pm@The whole world. Anyone have a valid reason to prefer CSV...?
Some people may have "reasons" but none of those are valid. 8)
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: What is a (better) replacement for CSV-data?

Post by bogs »

dunbarx wrote: Tue Jan 19, 2021 9:11 pm @The whole world. Anyone have a valid reason to prefer CSV, even if you have to read data in that format?
Well, I imagine it keeping someone employed might be a valid reason ;)
Image
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10504
Joined: Wed May 06, 2009 2:28 pm

Re: What is a (better) replacement for CSV-data?

Post by dunbarx »

Bogs.

You must have meant "annoyed" not "employed".

Craig
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: What is a (better) replacement for CSV-data?

Post by bogs »

Employed to be a noid ....HEY, THATS MY JOB!!! :twisted:
Image
Post Reply