Forum Discussion

Juan Pablo Gallardo's avatar
Juan Pablo Gallardo
Brass Contributor
Oct 31, 2017
Solved

change positions

I have the following csv file with 2 lines but it could contain many lines of information being the first line alway the same header and then each consecutive line has purchase order details: file1...
  • IngeborgHawighorst's avatar
    Oct 31, 2017

    Hello,

     

    you can use Power Query to do that. Power Query is a free add-in from Microsoft for Excel 2010 and 2013 and built into Excel 2016 as Get and Transform.

     

    Create a new query from a file, navigate to the CSV file and open it. Remove the columns you don't need, reorder the columns as you need them and save the query to the worksheet. Save the file as an Excel file.

     

    Then use Save As to save the sheet with the query result as a CSV file.

     

    When the original CSV file changes, you can open the saved Excel file, refresh the Power Query and save the query result as a CSV file again. 

Resources