Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Suggested answer

Data from Excel to Sharepoint list create&update

(0) ShareShare
ReportReport
Posted on by 8
Hello everyone! Could someone can solve this problem? Thank you!
 
Purpose: extract data from excel table to sharepoint list
Backgroud: I made a flow and used [control] action. If the [ title] column data from the excel(source) is the same with the [title] data in the sharepoint list (target),  the corresponding items in the sharepoint list(target) will be updated by the data from excel(source). And if it is not, the new data record in excel will be copied to the sharepoint list. I tested and found an error. Because of the single quotation mark in the title, The query in the [get items] action did not work.  The [get items] action is for getting the column data in sharepoint list , the query in it is to decide the title is the same with the title in excel or not. The query what I wrote is title eq 'dynamic content title' 
 
What I did: For solving this problem, I used 2 variable actions.  First variable action  name: single-quote, type: string, Value: '     Second variable action name: single-quote-esc, type: string, Value: ''   ã€€
then I set the query in the [List rows present in a table ] action which is for getting the data from the excel(source).   I set the query like this replace(item()?['Title'],variables('single-quote'),variables('single-quote-esc'))     And I set the same query to the  [get items] action.
 
Problem: After what did, the test still failed. The error is [Unable to process template language expressions in action 'get items' inputs at line '0' and column '0': ''The template language function 'replace' expects its first parameter 'string' to be a string. The provided value is of type 'Null'. ] I think the problem is the query, but I don't know how to improve it.
replace(item()?['Title'],variables('single-quote'),variables('single-quote-esc'))
And I set the same query to the  [get items] action.
 
The flow architecture what I made
manually trigger → variable (for counting ) →variable single quote →variable single-quote-esc→do until(for get data more than 256)→get items →apply to each → control  
  ∟ true → [create item]
  ∟ false  →for each → [update item]
  • KS-29050310-0 Profile Picture
    8 on at
    Data from Excel to Sharepoint list create&update
    @David_MA Thank you for your support.
    But there isn’t any null in the title column of the excel (source data)
    I think the issue maybe is I wrote the query wrongly. But I don’t know how to improve it.
     
    another issue maybe is I don’t know if I should write the query both in [list rows present in a table] and [get items]
     
  • Suggested answer
    David_MA Profile Picture
    11,329 Super User 2025 Season 1 on at
    Data from Excel to Sharepoint list create&update
    Try updating your expressions with an if() statement to check if the value where you want to replace the character is not null. For example: if(empty(item()?['Title']), null, replace(item()?['Title'], variables('single-quote'), variables('single-quote-esc')))
     
    According to the error message, there is no data (null) and because of this the replace fails since there is nothing for it to act on.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Restore a deleted flow