Aug 02 2020 04:31 AM
Annoying new problem, with a recent Excel "update"...
I have a standardized CSV file format that used to load into excel fine.
The file is ";" separated and commences with a few lines of header data, 2 columns and then multiple lines of data 10+ columns of main data.
Previously Excel used to look at file and set up the import to bring data in for the 10+ columns.
Now it seems to look at the first line and then set all import to that.
Header1; text1
Header2; text2
Header3; text3
Data1; Data2; Data3; Data4; Data5; Data6; Data7; Data8; Data9; Data10
Data1; Data2; Data3; Data4; Data5; Data6; Data7; Data8; Data9; Data10
Data1; Data2; Data3; Data4; Data5; Data6; Data7; Data8; Data9; Data10
Data1; Data2; Data3; Data4; Data5; Data6; Data7; Data8; Data9; Data10
Data1; Data2; Data3; Data4; Data5; Data6; Data7; Data8; Data9; Data10
Data1; Data2; Data3; Data4; Data5; Data6; Data7; Data8; Data9; Data10
How do I use the previous default and load this all? or
Select which line sets the number of columns
ATM I have to edit the CSV and either drop a dummy copy of a dataline into the first line or
Delete my header data.
Neither is what I want to do.....
Thoughts?
Aug 02 2020 09:11 AM
@Chris_Shackleton , you can use the "From Text/CSV" option from the Get & Transform section in the Data tab:
Then, in the dialog that pops up, select the "Transform Data" Button:
This will take you to the Power Query Editor and you can do a lot of transformations from here. In this case you can remove the top 3 rows and perform further data shaping you require:
Once you are done with your transformations, click on Home->Close and Load To:
You can load to your desired location:
Aug 02 2020 09:39 AM
Hi thanks for the response.
Hadn't used that option before.
While it does allow me to deselect the top rows when I "delete" them
the import is still limited to the 2 columns.
Am I missing a stage?
Aug 02 2020 09:43 AM
@Chris_Shackleton , Power Query is incredibly powerful and can pretty much do everything you can throw at it. I was able to import everything based on a made up txt file I created from your original post. If you can share a sample of your file (removing any confidential data), I can provide more assistance.
Aug 02 2020 12:11 PM
SolutionIn general you may allow legacy text import wizard in options
which was the only option in previous Excel versions, and use it. But both this wizard and Power Query give exactly the same result, they recognize all data columns. Perhaps it's something else with your file, better if you submit it as txt file, not as the part of the text within the post, which is actually HTML.
Aug 09 2020 01:59 PM
Aug 09 2020 02:13 PM
Aug 09 2020 02:29 PM
Thanks for the quick response.
OK so when I load the file I sent (just edited to remove sensitive data) it also works for me.
Seems like the original just needs to be opened in a text editor and re-saved.
Solved thanks m8
Aug 02 2020 12:11 PM
SolutionIn general you may allow legacy text import wizard in options
which was the only option in previous Excel versions, and use it. But both this wizard and Power Query give exactly the same result, they recognize all data columns. Perhaps it's something else with your file, better if you submit it as txt file, not as the part of the text within the post, which is actually HTML.