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 Automate / Split function: Text t...
Power Automate
Answered

Split function: Text to columns in Excel

(0) ShareShare
ReportReport
Posted on by 8

I have a Survey Form.  I use power automate to update an Excel file every time a survey is submitted.

One of the survey questions is a ranking of items.  The results of the ranking appears in a string separated by a comma.

example: 

Compensation/Career Opportunities, Champion Team Results/Recognition, Communication, Cross Team Collaboration, Meetings, Technology/Upskill, Value Employees and Customers, Vision & Strategy, Work Life Balance (improve for teams), None from this group         

I need to split these ranked items out across 10 separate columns to look like:

Compensation/Career OpportunitiesChampion Team Results/RecognitionCommunicationCross Team CollaborationMeetingsTechnology/UpskillValue Employees and CustomersVision & StrategyWork Life Balance (improve for teams)None from this group

 

I have not been able to figure out how to do this and have not found any other forum post that addresses this.

my flow looks like the following with the function(s):

fx split(Outputs('Compose'),',')[0]

split(Outputs('Compose'),',')[1]

split(Outputs('Compose'),',')[2]  .... etc.

 

I am new to this and I know I am missing something but I don't know what I don't know.

 

Nanoo51969_0-1698686161668.png

 

Categories:
I have the same question (0)
  • rzaneti Profile Picture
    4,483 Super User 2026 Season 1 on at

    Hi @Nanoo51969 ,

     

    I'm not sure if I understood correctly where is your issue. I've tested with the same expression that you used and it worked fine (I've just included a trim to remove any additional spaces at the beginning and at the end of the strings):

    rzaneti_0-1698700961626.pngrzaneti_1-1698700970276.png

     

    Each compose will will have one of the strings, and then you can add them (as dynamic content) to an Excel table by using the 'Add row into a table' action. 

     

    If this is not exactly what you need, please bring more details about the problem and which is the expected output.

     

    Also, I'm sharing these links related to the topic to bring some additional context about how to work with text expressions in Power Automate and integrate it with Excel:

     

    - Extracting and cleaning texts with Power Automate: http://digitalmill.net/2023/08/12/how-to-extract-and-clean-texts-with-power-automate/ 

    - Inserting data into Excel tables http://digitalmill.net/2023/07/24/inserting-and-updating-data-into-excel-tables-with-power-automate/ 

  • Nanoo51969 Profile Picture
    8 on at

    Thank you.  Where I am having the problem is that it is not writing the split string back into the next excel column.

    As you mention above, you can "add a row to the table" but I do not want to add a row.

    I need a "text to columns" type of function where the 1st selection is in column k, the second selection in column L  the next in column M, the next in column N and so on.

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    Can you clarify a few things?

    1. Will there already be a header for each of these values in your Excel Table?
    2. Do they need to just be added across the columns in the order they come through as, or would they need to always be in the same order?

    Is this the output you would be expecting:

    grantjenkins_0-1698718655861.png

  • Nanoo51969 Profile Picture
    8 on at

    Hi Grantjenkins, 

    This is a ranking question so the importance will differ depending on who is filling out the survey.

    The Column Headings are Rank1, Rank2, Rank3 etc.

    But.... I think I figured it out.  I was missing an Update A Row for Excel. Uhg.

    Also did not know how to find the results of the split  (if the function was working) until the last response so went in and figured out how to check that too.

    Thank you everyone for your 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard