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
Anonymous
Not applicable

Can't refresh data. Error message "The Csv.Document parameter 'Columns' is invalid."

artvandelay posted about this, but I need help on the solution. Supposedely the fix is to "designate your .csv file as a text file and let the query dilimit the columns at each occurence of the comma."

 

I don't know how to do that...

 

Any thoughts are really appreciated.

 

Here's the error message below:

 

Data source type:
Data source error: The Csv.Document parameter 'Columns' is invalid.
Request ID: 35fa1a44-0f7c-ec1e-f428-63dabb348cd0
Time: 2016-03-11 17:01:29Z

 

FYI: I'm creating a report from data in a folder that contains multiple .csv files

FYI2: I have other datasets setup like this one, but they're not giving me any issues...

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Fixed it.

 

This may not be the solution for everyone with this error message, but what worked for me was upgading to the Power BI Entrerprise Gateway and configuring the data refresh through that.

 

I had eliminated all other potential causes, so deleting the Personal Gateway and installing/configuring Enterprise was my last troubleshoot.

View solution in original post

4 REPLIES 4
LyndonJohnson
Regular Visitor

We found a solution by modifying the Csv.Document step as explained below. We encountered this same error in one of our solutions built in Power Query when a client updgraded from Excel 2013 to Excel 2016. The query was importing a CSV and was returning this error on the step that uses Csv.Document. It was and is still working correctly in Excel 2013, but was not working in Excel 2016.

 

The code that was returning the error was:
Csv.Document([Content],[Delimiter=",", Columns=40, Encoding=1252, QuoteStyle=QuoteStyle.None])

 

We changed it to the following:
Csv.Document([Content],[Delimiter=",", Column=40, Encoding=1252])

 

There were 2 changes, highlighted in red. Columns becomes Column (i.e. singular). This then no longer returns the parameter 'Columns' is invalid error message, but then returns an error message related to QuoteStyle. We then removed the QuoteStyle part. This then worked in Excel 2016. This code also works in Excel 2013 and in Power BI Desktop.

Anonymous
Not applicable

Fixed it.

 

This may not be the solution for everyone with this error message, but what worked for me was upgading to the Power BI Entrerprise Gateway and configuring the data refresh through that.

 

I had eliminated all other potential causes, so deleting the Personal Gateway and installing/configuring Enterprise was my last troubleshoot.

I also had this issue come up on a new report pulling multiple csvs..it worked for the first couple refreshes then popped this error....(other reports work fine)....I am using personal gateway...what I did was in query editor.....under applied steps....go to source and click the gear icon to the right....then "Open File as" select "text file"...hit ok....you will get errors cause you just messed up all your steps.....but not to worry....click "Split Column" in the ribbon above...and delimit by comma...insert this step...and you should be good to go...

 

Why this worked I have no idea...but it fixed my issue...i also deleted the dataset from the cloud and re uploaded once i finished doing the above in desktop. So far it is working again

 

 

 

jmh24c
Microsoft Employee
Microsoft Employee

I have had this same issue since 3/10 and cannot resolve.  I have even removed every csv file and replaced with .txt files and the refresh still chokes.  Does anyone know how to resolve this issue below?

 

"The Csv.Document parameter 'Columns' is invalid."

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.