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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors