Power Query Column Name Limits

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
Is there a character limit or certain invalid characters in column names in Power Query? I'm trying to rename some columns and getting an error,

Code:
Unexpected error: Length cannot be less than zero.
Parameter name: length
Details:
    Microsoft.Mashup.Evaluator.Interface.ErrorException: Length cannot be less than zero.
Parameter name: length ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Microsoft.Mashup.Engine1.Library.Common.SyntaxTree.Sql.Alias.GetUniqueIdentifier(String identifier, String originalIdentifier, Int32 maxLength)
   at Microsoft.Mashup.Engine1.Library.Common.SyntaxTree.Sql.Alias.AssignedAlias..ctor(String name, SqlSettings sqlSettings)

Edit: As it turns out, it's giving me this error if I have any spaces in my column name. I am attempting to rename columns from a database table; is there a reason Power Query wouldn't be allowing me to do this?
 
Last edited:

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Do you have any leading/trailing spaces in the names you are trying to use to rename the columns?
 
Upvote 0

Forum statistics

Threads
1,225,725
Messages
6,186,646
Members
453,367
Latest member
bookiiemonster

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top