ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Parse raw data (https://www.excelbanter.com/excel-programming/280398-parse-raw-data.html)

Larry[_11_]

Parse raw data
 
I would like to take a string of data and parse it into a
excel spreadsheet. I could have a string data with a
record length of 70 for one spreadsheet and another with a
length of 7000 for a different spreadsheet. The string
data is not delimited. Your assistance would be greatly
appreciated.

Tom Ogilvy

Parse raw data
 
So what are the rules for breaking up the data into columns, or do you want
it all in column 1.

Generally, either the data is fixed width or delimited. If it is neither,
then I am not sure how you would be able to determine where one field ends
and another begins.

Excel has 256 columns - a 7000 width record - would that be broken into less
than 256 columns?

--
Regards,
Tom Ogilvy

"Larry" wrote in message
...
I would like to take a string of data and parse it into a
excel spreadsheet. I could have a string data with a
record length of 70 for one spreadsheet and another with a
length of 7000 for a different spreadsheet. The string
data is not delimited. Your assistance would be greatly
appreciated.




No Name

Parse raw data
 
The record is fixed length. I want to parse out the data
into sevral rows in one column. The rows will have
description of what that value is used for. The external
7000 byte record will only have one record in it at a
time. I have already created all the sheadsheets of the
different record lengths and there discriptions.
-----Original Message-----
So what are the rules for breaking up the data into

columns, or do you want
it all in column 1.

Generally, either the data is fixed width or delimited.

If it is neither,
then I am not sure how you would be able to determine

where one field ends
and another begins.

Excel has 256 columns - a 7000 width record - would that

be broken into less
than 256 columns?

--
Regards,
Tom Ogilvy

"Larry" wrote in

message
...
I would like to take a string of data and parse it into

a
excel spreadsheet. I could have a string data with a
record length of 70 for one spreadsheet and another

with a
length of 7000 for a different spreadsheet. The string
data is not delimited. Your assistance would be greatly
appreciated.



.


Tom Ogilvy

Parse raw data
 
read the file in as a single string, then use the mid function to select the
pieces you want

assume you 7000 byte record is in the variable sLine

Open "C:\Myfolder\Myfile.txt" for Input as #1
Line Input #1, sLine
Close #1
cells(3, 2) = Mid(sline,300,40)
cells(4, 2) = Mid(sLine,341,3)
would give you the 40 characters beginning at position 300 in B3 and the 3
characters starting at postion 341 in B4 for example.



--
Regards,
Tom Ogilvy

wrote in message
...
The record is fixed length. I want to parse out the data
into sevral rows in one column. The rows will have
description of what that value is used for. The external
7000 byte record will only have one record in it at a
time. I have already created all the sheadsheets of the
different record lengths and there discriptions.
-----Original Message-----
So what are the rules for breaking up the data into

columns, or do you want
it all in column 1.

Generally, either the data is fixed width or delimited.

If it is neither,
then I am not sure how you would be able to determine

where one field ends
and another begins.

Excel has 256 columns - a 7000 width record - would that

be broken into less
than 256 columns?

--
Regards,
Tom Ogilvy

"Larry" wrote in

message
...
I would like to take a string of data and parse it into

a
excel spreadsheet. I could have a string data with a
record length of 70 for one spreadsheet and another

with a
length of 7000 for a different spreadsheet. The string
data is not delimited. Your assistance would be greatly
appreciated.



.





All times are GMT +1. The time now is 07:25 PM.

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