BBC BASIC for Windows
Programming >> Database and Files >> Comma delimited files http://bb4w.conforums.com/index.cgi?board=database&action=display&num=1382700318 Comma delimited files
Post by dje4816 on Oct 25th, 2013, 11:25am
I have saved a .dat file containing just numbers. I want to import this into Excel for further processing as a comma-delimited file. But the file contains gibberish - a load of symbols instead of my numbers.
Can anyone advise me how to keep this in the format I wrote to file, please?
Dave. Re: Comma delimited files
Post by admin on Oct 25th, 2013, 1:18pm
I have saved a .dat file containing just numbers. I want to import this into Excel for further processing as a comma-delimited file.
A good format to use, which will be understood by Excel, is CSV (Comma Separated Value). This Wiki article describes how to read and write CSV files in BBC BASIC:
The routines listed there assume that the data will be contained in a 2-dimensional string array, which is a good way of representing spreadsheet-style (row and column) data.
However, since CSV files are basically just plain-text files you can choose to read and write them in other ways if you wish. This article may be helpful: