Hello,
There are about 25 excel files in a directory, each of them have same column names for the first 20 columns. After that some of them have extra columns and its random. How do i remove these extra columns so that all these files have the same structure
For e.g.
File 1
Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Extra Col 1 |
File 2
Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Extra Col 1 | Extra Col 2 |
So from File 1 extra Col 1 needs to be removed
from File 2 extra Col 1 and 2 needs to be removed.
Any help is much appreciated
Hi @amrutkasyap
Read all the files and columns using the below macro and later deselect the not-required columns in select tool.
Reference post : https://community.alteryx.com/t5/Alteryx-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/ta-p/20480
Hope this helps : )
@amrutkasyap one option combine all files using a batch macro and remove the unwanted fields using select tool
Found a post which offered the answer
Hi @amrutkasyap
Glad to hear😀. All of them uses the same method 🙂 you can check through.
Happy to help : )
Cheers and have a nice day!