Featured Small Basic Wiki Article: Read and Write CSV Files
Here is a classic article from Florian that examines how to use CSV files in Small Basic.
Read the full article here:
And here is an excerpt:
===========================
What is CSV?
Comma separated values (CSV) is a file format that is used to exchange data between programs. It uses commas to separate values and requires equally many values on each line.
Example
For a game we want to save the best player’s score, its name and the date on which the score was achieved.
The format we choose therefore is: [player’s name], [score], [date]
Bob,12,2013-01-02
This means that bob scored 12 points at 2013-01-02. We can easily store multiple scores by writing them one below another.
Alice,15,2013-03-04
Bob,12,2013-01-02
Charlie,9,2013-05-06
Observation: CSV files can hold one to many records or lines with values.
=================
Read the full article here:
TechNet Wiki articles about Small Basic are gifts that keep giving, years later!
Have a Small and Basic week,
- Ninja Ed
Comments
- Anonymous
October 09, 2016
Would i be able to take one of my favorite excel .xls file ( planet gravity ) and save it with .csv extension, and thenopen the files with Small Basic ? that would be and outstanding tool !!- Anonymous
October 30, 2016
Yes. You might need to tweak and experiment with the file to get it right, though.Thanks, Yvan!
- Anonymous