View Single Post
  #3   Report Post  
Old December 31st 18, 08:05 PM posted to microsoft.public.excel.programming
[email protected] is offline
external usenet poster
First recorded activity by ExcelBanter: Dec 2018
Posts: 5
Default covert data from text file into columns

On Sunday, December 30, 2018 at 6:36:25 AM UTC-5, GS wrote:
A few Q's:
Do you want to deliberately omit the state from Location field data as
Location source data "San Bernadino CA" parses as "San Bernadino"

Must the fieldnames be EXACTLY as depicted...
Location,Store ID,Stock ID,Address,Xroad ID,ID
..or can they be...

The structure of the source data file is important in that it must be
CONSISTENTLY identical file-to-file. So...

Each block of data MUST be structured IDENTICALLY so...
Is the 1st line in the file always going to start with "Location = "?
OR: Will it be blank and "Location = " be line 2?

Is the filename variable or fixed?

Does each line in the source file ALWAYS end with CarriageReturn+LineFeed?
OR Carriagereturn only?
OR LineFeed only?

Can you post a download link to an actual file sample containing only say 10
blocks of data (1st 9 and last 1)?


Free usenet access at
Classic VB Users Regroup!

Thanks for helping me out.

The structure of the raw text file is
Data until Line 22 then two blanks - Carriage return Line feed
and then next set of data

Location = "San Bernandino CA"

Store ID = 1
Stock ID = 1
Address = 1001 Parkway Ave
Xroad ID = 1001
ID = 1001
Location = "San Francisco CA"
Store ID = 2
Stock ID = 2
Address = 2001 Morrison Ave
Xroad ID = 2001
ID = 2001

Location,StoreID,StockID,Address,XroadID,ID these can be the column names