Read from filetype

J

Jeff

Hi,

I have a program that read's data from .csv files and then does
calculations. The csv file is 100 rows x 100 columns, and the data is
integers. There are about 20 different versions of the csv file, all the
same dimensions with different numbers. Right I have to save 20 files and
then "read" each file seperately, but this is cumbersome.

I used to work with APL and you could save a filetype that could store all
the "data" in the arrays. So the file could be an array of
"ArrayOf_Integers[ 20 x 100 x 100]" and you could just read from this
filetype that was recognized by APL. This was convenient because all 20
files of 100x100 could be saved in a single file.

Is there a way to save the .csv files in a single fileformat that can be
then read by the VBA- or are there any other suggestions?

Thanks
 
J

Jeff

Ron,

This enables me to convert merged text files to an excel worksheet.

I want to read from the text file (the text file with all 20 csv's merged),
using

Open sourcefile For Input As #1

For z = 1 to 100
For y = 1 To 100
Input #1, Array[y,z]
Next y
Next z

Ron de Bruin said:
If I understand you correct ?
Try this to get one file with all data
http://www.rondebruin.nl/csv.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


Jeff said:
Hi,

I have a program that read's data from .csv files and then does
calculations. The csv file is 100 rows x 100 columns, and the data is
integers. There are about 20 different versions of the csv file, all the
same dimensions with different numbers. Right I have to save 20 files and
then "read" each file seperately, but this is cumbersome.

I used to work with APL and you could save a filetype that could store all
the "data" in the arrays. So the file could be an array of
"ArrayOf_Integers[ 20 x 100 x 100]" and you could just read from this
filetype that was recognized by APL. This was convenient because all 20
files of 100x100 could be saved in a single file.

Is there a way to save the .csv files in a single fileformat that can be
then read by the VBA- or are there any other suggestions?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top