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: 37
Joined: Mon Nov 16, 2020 8:16 pm

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

Post by Francesco77 » Tue Jan 19, 2021 7:37 pm

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: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Tue Jan 19, 2021 7:44 pm

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: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » Tue Jan 19, 2021 9:11 pm

@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: 2852
Joined: Sun Sep 23, 2007 4:58 pm

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

Post by SparkOut » Tue Jan 19, 2021 10:26 pm

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: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Tue Jan 19, 2021 11:09 pm

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: 9660
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » Wed Jan 20, 2021 2:12 am

Bogs.

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

Craig

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

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

Post by bogs » Wed Jan 20, 2021 10:53 am

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”