Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
manish2k
Regular Visitor

ignoring Line breaks within quotes while importing folder

Capture.PNG

 

Hello,

 

i'm pretty new to power bi and I''m trying to import a folder with CSV files in it . The files are comma seperated and are enclosed with double quotes . From what i have observed , some of the CSV files have line break within quotes . I am able to take care of these while importing individual files since i have an option to Ignore line breaks within quotes ( as shown in the image)

 

While importing these files all at once from a "Folder"i dont get such an option . Without this , there is data getting shifted to a new line in some some places midway when all the files are getting imported . Anyone have any idea to tackel this ?

 

Thanks

MK

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

To be honest, I'm not familiair with these specific options, but I do have an idea.

I would try and import 1 file with the options as indicated, next import the files from the folder and then adjust the relevant part of the generated code with the corresponding part of the code that was first generated for 1 file.

 

When importing files from a folder and combining them, you get several query objects.

The object that you should adjust is the query that transforms the example file, you can find at the location similar to this screenshot:

 

Transform Sample query 2.png

 

Probably it's most convenient to apply the adjustments via the Advanced Editor.

Specializing in Power Query Formula Language (M)

View solution in original post

4 REPLIES 4
AH_CEMVIC2023
Frequent Visitor

I found in the Transform sample file you could apply the same step, 'Ignore quoted line breaks'.  I am glad you found a solution.

MarcelBeug
Community Champion
Community Champion

To be honest, I'm not familiair with these specific options, but I do have an idea.

I would try and import 1 file with the options as indicated, next import the files from the folder and then adjust the relevant part of the generated code with the corresponding part of the code that was first generated for 1 file.

 

When importing files from a folder and combining them, you get several query objects.

The object that you should adjust is the query that transforms the example file, you can find at the location similar to this screenshot:

 

Transform Sample query 2.png

 

Probably it's most convenient to apply the adjustments via the Advanced Editor.

Specializing in Power Query Formula Language (M)

For anyone looking for the exact code, follow Marcel's advice and go into the "Transform Sample File.." settings.  Then go to the source and click on the gear icon and make sure to change the QuoteStyle from .None to .CSV  --> "QuoteStyle=QuoteStyle.Csv"

This is awesome ! Just how i wanted to work !! Thanks a lot 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.