BBC BASIC for Windows
« Comma delimited files »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:03pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Comma delimited files  (Read 1375 times)
dje4816
New Member
Image


member is offline

Avatar




PM


Posts: 11
xx Comma delimited files
« Thread started 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.
undecided
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Comma delimited files
« Reply #1 on: Oct 25th, 2013, 1:18pm »

on Oct 25th, 2013, 11:25am, dje4816 wrote:
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:

http://bb4w.wikispaces.com/Reading+and+writing+CSV+files

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:

http://bb4w.wikispaces.com/Reading+and+writing+plain+text+files

Richard.
User IP Logged

dje4816
New Member
Image


member is offline

Avatar




PM


Posts: 11
xx Re: Comma delimited files
« Reply #2 on: Nov 8th, 2013, 1:09pm »

Many thanks, Richard. Sorry to be a bit tardy coming back on this one.

Best regards,

Dave.
smiley
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls