Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading .csv files into variables 1

Status
Not open for further replies.

Ch3lsea

Technical User
Apr 25, 2001
3
US
Hi people,

1) Could someone tell me what the difference is reading in from an .ini and a .csv file -- pro's and con's

2) Could some one tell me where i could find some sample code on the .csv reading

many thanks

Alex T
 
An ini file is good for retrieving set bits of information. Like Datafile="c:\dump.txt".

A csv is better for storing and retrieving records of data.

With an ini file you have to specify exactly what you want piece of information you want to read. With a csv file you can read in a whole bundle of data into an array.

Say you have a file containing 10 records that have 10 fields each. Something like the following will read in the whole lot into an array:

For records=1 to 10
For fields=1 to 10
Input #1, array(records,fields)
Next
Next


If it's a couple of options: ini.
If it's a big bundle of data: csv.
HF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top