pyx12 icon indicating copy to clipboard operation
pyx12 copied to clipboard

can it convert to a tabular data format excel or tab delimited file ?

Open arjuniyer1978 opened this issue 5 years ago • 1 comments

I tried my best before posting here, apologies if its redundant.

I am looking to see if i pass a file that is in ANSI5010 format like the one in your examples folder for ANSI5010, can it read and convert the data to a tabular format... like a column for each value from INS to the last loop 2300/2400 as the case maybe and report a person's data from multiple rows onto 1 row in the tabular format?

For Example - INSY18030XNAC FT~ REF0F00389999~ REF1L000003409999~ REF3HK129999A~ DTP356D820150301~ NM1IL1DOEJOHNA34999999999~ N3777 ELM ST~ N4ALLEGANMI*49010CY03~ DMGD819670330MO~ LUIESSPANISH~

should become something like below... INS01 INS02 INS03..........REF01 REF02.... Y 18 030 ........... 0F 000389999....

arjuniyer1978 avatar Nov 23 '20 11:11 arjuniyer1978

XML is the only current non ANSI format that the command lines deal with re: in/out. You can write your own python program using this library combined with CSV kit or pandas and do your own transforms. Personally - I just use XSLT scripts to take the XML outputs into CSV. So Python or XSLT programming are your two best paths.

On Mon, Nov 23, 2020 at 3:56 AM arjuniyer1978 [email protected] wrote:

I tried my best before posting here, apologies if its redundant.

I am looking to see if i pass a file that is in ANSI5010 format like the one in your examples folder for ANSI5010, can it read and convert the data to a tabular format... like a column for each value from INS to the last loop 2300/2400 as the case maybe and report a person's data from multiple rows onto 1 row in the tabular format?

For Example -

INSY18030XNAC FT~ REF0F00389999~ REF1L000003409999~ REF3HK129999A~ DTP356D820150301~ NM1IL1DOEJOHNA34999999999~ N3777 ELM ST~ N4ALLEGANMI49010* CY03~ DMGD819670330M O~ LUI**ESSPANISH~

should become something like below... INS01 INS02 INS03..........REF01 REF02.... Y 18 030 ........... 0F 000389999....

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/azoner/pyx12/issues/71, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUDGIIU7PD3EEJ4QV4QLSRJEX7ANCNFSM4T7ML2FQ .

ddw360 avatar Nov 23 '20 15:11 ddw360