WRITING AN EXCEL FILE FROM BASIC
WRITING AN EXCEL FILE FROM BASIC
(OP)
Hi Guys.
I want to create files that can be read directly as EXCEL files from a BASIC program running under DOS.
What I do right now , for example, is as follows:
1000 OPEN "O",1,A$ + ".RYD"
1005 WRITE #1, "X", "Y", "Z"
1010 WRITE #1, P, Q, R
1015 CLOSE 1
This creates a file named A$.RYD with the data perfectly ok etc, but when trying to read it as an EXCEL file I have to do a bit of messing around to get the numbers to line up in cells properly.
It must be pretty simple to format the data to go directly into EXCEL.
Can anyone help please?
I want to create files that can be read directly as EXCEL files from a BASIC program running under DOS.
What I do right now , for example, is as follows:
1000 OPEN "O",1,A$ + ".RYD"
1005 WRITE #1, "X", "Y", "Z"
1010 WRITE #1, P, Q, R
1015 CLOSE 1
This creates a file named A$.RYD with the data perfectly ok etc, but when trying to read it as an EXCEL file I have to do a bit of messing around to get the numbers to line up in cells properly.
It must be pretty simple to format the data to go directly into EXCEL.
Can anyone help please?
RE: WRITING AN EXCEL FILE FROM BASIC
RE: WRITING AN EXCEL FILE FROM BASIC
RE: WRITING AN EXCEL FILE FROM BASIC
i gather u use the basic program to create the data needed by excel. the process is fine. excel will import the data; however, it helps if the source data (written by basic program) is a comma-seperated, semi-colon-seperated, or some other character seperated file. when excel reads in the data, it will automatically seperate the data into rows and columns.
for example,
basic file contains:
1234567890
excel will import (delimit) the data as one complete number.
whereas, the basic file contains:
1,2,3,4,5,6,7,8,9,0
excel will import (auto delimit) the data into 10 columns, without having to resort to extra effort in seperating the data.
good luck.
-pmover
RE: WRITING AN EXCEL FILE FROM BASIC
JWB46