cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sbgoh
Helper V
Helper V

Upload multiple excel files to Sharepoint list

Hi,

 

I have been finding a solution for many weeks to upload multiple excel files located in the sharepoint document folder to sharepoint list. However I am stuck at the List rows as I keep getting a error saying file cannot be found in sharepoint.

"Output" is compose from a variable where it is the URL of the sharepoint site. Greatly appreciate if anyone help?

 

sbgoh_0-1596787253930.png

 

7 REPLIES 7
JohnAageAnderse
Super User
Super User

Hello @sbgoh 

The issue you are facing is that the Path includes the document library name also, but List rows present in a table does not expect that.

Use an expression to remove the document library name, including a prepending slash, from the Path value.

Kind regards, John

Hi John,

 

My document lib name is fixed. Can enlighten my what expression do you mean? Thanks!

Hello @sbgoh 

In your List rows present in a table action, you are using the Path value in the File field.

As it contains the name of the document library also, you will have to replace it with an expression.

The expression should be:

replace(item()?['Path'],'/Shared Documents','')

 

This will remove the document library from the value.

Kind regards, John

Hi John,

 

I tried but I got error. Not sure did I use it correctly?

sbgoh_0-1596810761252.pngsbgoh_1-1596810876321.png

 

Hello @sbgoh 

 

The replace expression must be in the File field, not in the Document library field! 🙂

The Document library field was fine!

Try again, kind regards, John

Hi John,

It is still not working after I tried your method. Does the excel connector allow dynamic filename?

 

sbgoh_0-1596870311309.png

 

Hello @sbgoh 

In the flow editor, can you manually select the "g.xlsx" file in the List rows present ... ?

You should then be able to see what the value should be in the File field.

Maybe use a variable or a Compose action to get the correct value to use in that field. This will also make it visible what value the Path has and see what needs to replaced away.

I am currently only on mobile device, so difficult to get and add screenshots 🙃

Anyway hope it helps a little, John

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (47,528)