Showing results for 
Search instead for 
Did you mean: 
Power Participant
Power Participant

Create a random password for each item in a collection and write back to excel



What I'm doing now is reading a table from a excel file hosted on OneDrive, I create a collection from this.

The Excel file has a Column named Password and a column named User.


What I want to do is for each line that has "User column" filled in i want to add a random password in the "Password column"

I need to check for blanks as the table contains blanks and I only want to enter a random password next to the "User columns" that is not blank.


I'm stuck here, I can read the table, I can generate 1 password but i do not know how to generate a random password for each User.


I guess I need to write something like ForEach that is not blank generate password and add to table?, But Im stuck here



Counting blanks.
CountIf(ExcelUsersCollection, !IsBlank('First name'))

Generat password.




This way im able to create a new collection and add random passwords to each line, but how do i filter out blanks and how can i write back this to the excel?

ClearCollect(newlist, AddColumns(ExcelUsersCollection, "Password", Concat(FirstN(Shuffle(Split("abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789","")),8),Result)))


Skilled Sharer
Skilled Sharer

You could use a GUID.


@mogulman Thank you for answering but I'm not sure how this would solve it

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,731)