If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Multiple Rows from text file to one Excel Row

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-15-11, 23:04
JeepMan JeepMan is offline
Registered User
 
Join Date: Oct 2011
Posts: 4
Multiple Rows from text file to one Excel Row

Hi,
Please help. I have a text file in EDI line by line format. I need to capture specific rows from the EDI text file to one row in Excel for each segment of data. Plus line number for two of the rows identified.

End result needs to look like this in Excel. Only using the slash here to who different columns on output to Excel. Guess I need a counter to identify line numbers for the HL lines.

ST*837*0001/HL*2*1*22*0/HL Line number/CLM*1002111111O60482736/HL*3*1*22*0/HL Line number/CLM*1002222222O60482737

Next row in Exel
ST*837*0002/HL.......

Thank you very much for any assistance given.



Example of EDI file:

ISA*00* *00* *ZZ*491 *ZZ*EMEDNYBAT~
ST*837*0001*005010X223A2~
BHT*0019*00*5093946*20111114*2335*CH~
HL*1**20*1~
PRV*BI*PXC*282X00000X~
HL*2*1*22*0~
SBR*P*18**MEDICAID*****MC~
CLM*1002111111O60482736*2***13;A;5**A*Y*Y********* **8~
DTP*096*TM*1900~
DTP*472*D8*20100101~
REF*6R*999827361~
HL*3*1*22*0~
SBR*P*18**MEDICAID*****MC~
CLM*1002222222O60482737*1***13;A;5**A*Y*Y********* **8~
DTP*096*TM*1900~
SE*59*0001~
ST*837*0002*005010X223A2~
BHT*0019*00*5093947*20111114*2335*CH~
HL*1**20*1~
PRV*BI*PXC*282X00000X~
HL*2*1*22*0~
SBR*P*18**MEDICAID*****MC~
CLM*1002333333O60482738*1***13;A;5**A*Y*Y********* **8~
DTP*096*TM*1900~
DTP*472*D8*20100101~
REF*6R*604222222~
HL*3*1*22*0~
SBR*P*18**MEDICAID*****MC~
CLM*1002444444O60482739*2***13;A;5**A*Y*Y********* **8~
DTP*096*TM*1900~
DTP*434*RD8*20100101-20100101~
SE*59*0002~
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On