ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Read from filetype (https://www.excelbanter.com/excel-discussion-misc-queries/189932-read-filetype.html)

Jeff

Read from filetype
 
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


Ron de Bruin

Read from filetype
 
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" wrote in message ...
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


Jeff

Read from filetype
 
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" wrote:

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" wrote in message ...
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




All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com