BBC BASIC for Windows
General >> General Board >> excel spreadsheet http://bb4w.conforums.com/index.cgi?board=general&action=display&num=1304851394 excel spreadsheet
Post by craven on May 8th, 2011, 10:43am
i use bb4w to run a basic pbm game, all my data is saved/loaded using the A=openin a$ and A=openout a$ commands and this is perfect for my needs but can anyone tell me if there is a simple way of getting microsoft excell to read these data files as well?
Richard.
Re: excel spreadsheet
Post by craven on May 10th, 2011, 8:58pm
thanks richard but i do not understand it being the simpleton that i am!! i need to understand it before i can write it and i do not understand it!!
Re: excel spreadsheet
Post by admin on May 10th, 2011, 9:44pm
i need to understand it before i can write it and i do not understand it!!
If you prefer not to write your own code you can just copy-and-paste the PROCwriteCSV procedure from the Wiki; you do not need to understand it! The only disadvantage of simply taking the code from the Wiki is that it assumes your data will be in the form of a 2-dimensional string array:
Code:
DIM array$(rows%,columns%)
so if your data isn't already in a suitable form you will need to convert it.
The advantage of writing your own code would be that you get to decide the format in which the data is held. If you need more information on the Comma Separated Value file format this Wikipedia article has details: