Home

Reformat CSV file

%3CLINGO-SUB%20id%3D%22lingo-sub-748878%22%20slang%3D%22en-US%22%3EReformat%20CSV%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-748878%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20given%20a%20csv%20file%20containing%20data%20in%20a%20certain%20format.%20I%20order%20for%20me%20to%20use%20this%20data%20in%20my%20software%20I%20must%20reformat%20it.%26nbsp%3B%20The%20reformat%20format%20does%20not%20look%20anything%20like%20the%20input%20but%20I%20am%20hoping%20someone%20out%20there%20has%20the%20knowledge%20to%20show%20me%20how%20to%20preform%20this%20task.%26nbsp%3B%20I%20have%20include%20sample%20files%20showing%20the%20original%20format%20(OriginalFormat.csv)%20and%20what%20I%20need%20it%20to%20look%20like%20(ReformattedFormat.csv).%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20help%20is%20greatly%20appreciated%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBj%C3%B6rn%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-748878%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-748933%22%20slang%3D%22en-US%22%3ERe%3A%20Reformat%20CSV%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-748933%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F374430%22%20target%3D%22_blank%22%3E%40Bj_bear55%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBjorn%2C%20that's%20not%20only%20reformatting%2C%20that's%20transforming%20the%20data%20-%20you%20have%20different%20number%20of%20columns%2C%20different%20names%20for%20them%2C%20different%20type%20of%20data%20(text%20vs%20numbers)%20in%20similar%20columns.%20Perhaps%20that's%20job%20for%20Power%20Query%20with%20some%20M-coding%2C%20but%20that's%20not%20clear%20what%20exactly%20is%20needed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-750070%22%20slang%3D%22en-US%22%3ERe%3A%20Reformat%20CSV%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-750070%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%20Regei%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20are%20correct%2C%20it%20is%20more%20than%20simply%20reformatting.%26nbsp%3B%20I'm%20just%20a%20simple%20Excel%20user%2C%20never%20having%20to%20do%20more%20than%20keying%20in%20formulae%20so%20when%20this%20challenge%20came%20across%20my%20desk%20I%20knew%20I%20needed%20advice%20from%20others.%26nbsp%3B%20I%20guess%20Power%20Query%20and%20M-coding%20is%20not%20simple%20to%20learn.%26nbsp%3B%20I%20will%20try%20to%20press%20my%20software%20support%20for%20more%20help...hard%20to%20get%20these%20days.%26nbsp%3B%20Thanks%20for%20you%20advice.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBj%C3%B6rn%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Bj_bear55
New Contributor

Hello All

 

I've been given a csv file containing data in a certain format. I order for me to use this data in my software I must reformat it.  The reformat format does not look anything like the input but I am hoping someone out there has the knowledge to show me how to preform this task.  I have include sample files showing the original format (OriginalFormat.csv) and what I need it to look like (ReformattedFormat.csv).  

 

Your help is greatly appreciated

 

Björn

2 Replies
Highlighted

@Bj_bear55 

Bjorn, that's not only reformatting, that's transforming the data - you have different number of columns, different names for them, different type of data (text vs numbers) in similar columns. Perhaps that's job for Power Query with some M-coding, but that's not clear what exactly is needed.

Highlighted

@Sergei Baklan 

Hello Regei

 

Your are correct, it is more than simply reformatting.  I'm just a simple Excel user, never having to do more than keying in formulae so when this challenge came across my desk I knew I needed advice from others.  I guess Power Query and M-coding is not simple to learn.  I will try to press my software support for more help...hard to get these days.  Thanks for you advice. 

 

Björn