Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to import all different data CSV files from a folder

Hi ,

 

Is there a way to import .csv files from a folder? I do know that we can import all the .csv files in one go with similar data structure but what about .csv files which have different data Eg: Studen_Marks, HR_Details??

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous,

    You can use the folder connector to access the folder and list its files on the power query side without any combine or merge-operations.
    Then you can add filters on this list to filter records based on their filename, Extension, modify dates, or other conditions to keep the files you wanted and do merge operation on remained files. (for your scenario, it should keep the files with 'CSV' Extensions and filename equal to 'Studen_Marks', 'HR Details')

    Regards,

    Xiaoxin Sheng

3 Replies

  • Anonymous , I doubt it can work as a folder import. You need to import as individual files.

  • camargos88's avatar
    camargos88
    Community Champion

    Anonymous ,

     

    You can reference to the folder and see the first step where you can filter the metadata, there you can reference the query many times you want, filter the same structure (if any) and combine them, if possible.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    You can use the folder connector to access the folder and list its files on the power query side without any combine or merge-operations.
    Then you can add filters on this list to filter records based on their filename, Extension, modify dates, or other conditions to keep the files you wanted and do merge operation on remained files. (for your scenario, it should keep the files with 'CSV' Extensions and filename equal to 'Studen_Marks', 'HR Details')

    Regards,

    Xiaoxin Sheng