web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Syntax error while fet...
Power Apps
Answered

Syntax error while fetching column name from Excel

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am building a canvas App in Powerapps. My app is fetching the data from a Excel file stored in sharepoint.

Unfortunately I am getting a syntax error, while app is trying to fetching data from the excel

 

Error - 

"body":"{\r\n \"status\": 400,\r\n \"message\": \"Syntax error at position 16 in 'Application Name asc'.\\r\\n inner exception: Syntax error at position 16 in 'Application Name asc'.\\r\\nclientRequestId: 1ecd2ab2-8525-484d-a216-a0af94fa7953\",\r\n \"error\": {\r\n \"message\": \"Syntax error at position 16 in 'Application Name asc'.\\r\\n inner exception: Syntax error at position 16 in 'Application Name asc'.\"\r\n },\r\n \"source\": \"excelonline-ci.azconn-ci-001.p.azurewebsites.net\"\r\n}"}},"correlationId":"dd61c0ed-4cf9-4caf-8c59-25f5d50560114"},

 

Application Name is Column Name. 

I tried using "Application_x0020_Name" in Items bar, but it throw the error that such column name is not available.

I don't want to remove spaces from my column name as mentioned here https://powerusers.microsoft.com/t5/Building-Power-Apps/PowerApps-Excel-error-The-requested-operation-is-invalid-inner/td-p/949559. 

 

atrey_24_0-1653584326815.png 

 

Database screenshot:

atrey_24_0-1653584621695.png

 

 

 

Any help would me really helpful.

Thanks in Advance

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Intellisence is your friend.  Start by typing the Search() function and after putting in the table name and TextInput.Text, PowerApps will suggest the column names surrounded with double quotes. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Drrickryp,
    Yes I am using that only. Still seeing the issue.

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Excel is a peculiar back end.  If you have changed the column names or table structure in Excel after you imported the table, PowerApps may not recognize the changes.  I suggest that you delete the table from your app,  go back to your Excel table, remove spaces and unusual characters from the column names, make sure all column types are number, text or date/time type, that the first row of the table under the headers has data in every column, even if it means re-sorting the table, save it and go back into PowerApps and re-import it.  

    Then watch Shane Young's video why Excel is a terrible data source here: https://www.youtube.com/watch?v=RtmZM3tm2Zs 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Drrickryp 
    Tried the above mentioned things but in vain.

    There is one observation though. Generally when there is a space in column name, say "Application Name", powerapps(Intellisence) read it as Application_x0020_Name, but in this case it is reading it as Application Name only.

    Does it mean that excel file is corrupted?

    IMG_20220527_005839.jpg

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Search() is not delegated in Excel and may be causing a problem. You can use Filter() and StartsWith() instead but if it were me, I would start over again with a completely new table in Excel.  Copy the data in your current table to a new table except for the column at the end that contains the PowerApps codes.  Give the table a new name and go through the new table and follow the steps I outlined above.  Then reconnect the new table to the app.  

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Drrickryp 

    I thought I got caught in issues similar to https://persnicketypowerapps.blogspot.com/2018/08/breaking-powerapps-cannot-save-or-edit.html
    So for now I finally created a new table by replacing "space" in column name with "underscore", and the issue got resolved.

    Thanks for the help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard