| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. CSV-files. (Comma Separated Value). #5079 Posted by: 2004-09-15 02:59:31 | I need some help to make a program to handle CSV-files. (Comma Separated Value).
I have an input file with data like this KGGN.TXT: 19970130,13.05,13.38,13.00,13.05,1950160,0 19970131,12.77,13.15,12.76,12.77,3083100,0 19970203,12.77,13.15,12.74,12.77,2114604,0 19970204,12.88,12.96,12.81,12.88,1895578,0 19970205,13.05,13.17,12.92,13.05,1785548,0 …1000 lines (records)
The program has to read this data, make a calculation (like multiplying) of the pricedata, and write the entire line, with the recalculated pricedate back to another file like KGGNmod.TXT.
I looked at the internet, but I couldn’t find any example. Can somebody help me with this? Any suggestion is welcome.
Thanks, Hans
| 2. Re: CSV-files. (Comma Separated Value). #5088 Posted by: 2004-09-15 22:28:04 | In addition to the answer at ezBoard;
td = (a-ld)*10^DD + .5 d$ = mid$(str$(d),2,DD)
would be a way to round the value for the formatting. The problem of values exceeding the number of decimals remains, obviously. Another problem is negative values.
The way to use the routine would be;
a = somevalueorother : FD = 2 : DD = 2 : FmtDt
for every value. | Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|