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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a CSV form exce...
Power Automate
Unanswered

Create a CSV form excel , with the last row and delete data excel

(0) ShareShare
ReportReport
Posted on by 8

Hi everybody

 

I need your help about my onboarding process, my last step is to create a CSV file who wil be use by a powershell script to create AD account

I fill a excel file, list row present, the CSV is created : no problem

But the CSV file take all rows, so if i have 2 rows,  there will have the 2 rows data into the CSV and 2 account created

so i try to put a Compose with this setting :

 

- last(outputs('List_rows_present_in_a_table')?['body/value'])

or with : last(outputs('List_rows_present_in_a_table')?['body'])

 

the csv take always all rows and not the last

 

An another solution, could be to create only one row and delete this row after csv processing

but i dont find how do that 

 

Pa : Pwer automate flow

pa1 : the ocmpose

pa3 : excel source to create the csv

 

thanks for you help

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @casperna,


    Have you tried using that expression in the From field of the Create CSV action instead of the Compose?

     

    Try something like below.

    I have added the square brackets to convert the one object into an array with one object.

     

    [@{last(outputs('List_rows_present_in_a_table')?['body/value'])}]

     

     

    lastitem_array.png

     

  • casperna Profile Picture
    8 on at

    Hi Expicornovus

     

    Great work !  thats work fine ,just with" [ ]" just incredible

    so many thanks for you help

     

    A last question , this weekend i found a another solution without "Compose" i have the same results

    in "list row in a table" , i fill Top count to 1

    but i dont understand why thats works,

    So i prefer our solution with the compose and  Function Last

     

    Thanks for your help

  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @casperna,

     

    The Compose is not really needed. It just uses the same data as the expression and shows it in a compose. 

     

    However, if you want keep using it you can use the setup like below where you use the outputs of the Compose instead.

     

    compose_last.png

  • casperna Profile Picture
    8 on at

    Thank you for the information

    Have a nice day

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard