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 / How to print excel dat...
Power Automate
Answered

How to print excel datatable value from a column with line break?

(0) ShareShare
ReportReport
Posted on by 134

Hi Community,

 

I would like to print value ABC from the column with linebreak in Excel as per the image below. Understand that it can be done using %RPData[0][0]% to get "ABC". But, I would like to call out using Column name instead, to avoid error if col is moved. I tried with %RPData[0]['TEST1TEST2']% or %RPData[0]['TEST1 TEST2']% but fail.

 

Any ideas on how to call out columns with line breaks?

 

bradt30h_0-1637059714894.png

Appreciate it very much!

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    What if you replace text in the datatable and get rid of the column line break?

  • VJR Profile Picture
    7,635 on at

    Hi @bradt30h ,

     

    Here is a working way to do that..

     

    • Read the Column Heading in a variable

            In this case the variable is MyColumnHeading.

            You can give a name similar to your Excel column headings.

            Also you can use a loop if you want to read all headings.

     

    VJR_0-1637120199907.png

     

     

    • Then use that column heading variable to get its value.

             Below is an example to display the 1st item (actually 2nd) from the data table.

             You can use the same inside a loop too. 

     

           

    VJR_1-1637120403170.png

     

     

    •         Here is the output after running the flow at line number 5.

                      

    VJR_4-1637120810618.png

     

     

     

    • Below is how the overall flow looks like

            

    VJR_3-1637120622251.png

     

  • bradt30h Profile Picture
    134 on at

    Great one VJR,

     

    But when reading, can it be dynamic? Now we are hardcoding the column cell. I am worried if the column is moved. So, I use Read from all available values from the worksheet.

    bradt30h_0-1637121963042.png

     

  • Verified answer
    bradt30h Profile Picture
    134 on at

    Hey VJR, I manage to do the alternative, I use "Find and Replace" function to replace the column name (with line break) with column (without line break). See the image below.

    bradt30h_1-1637123153046.png

    With this method, I can assure that even the column is moved, it will still work 🙂. Nevertheless, thanks so much for your help!

     

  • bradt30h Profile Picture
    134 on at

    Hey Michael,

     

    I didn't see your post earlier. Yes, replacing works! Thanks so much for your input 🙂

  • VJR Profile Picture
    7,635 on at

    Okay @bradt30h , no worries 🙂. Since the original post said only about "how to call out columns with line breaks" therefore I didn't share any information considering you needed anything as flexible as moving columns.

     

    1. Some recipients do not like replacing column headings. They need it as they are in the original file.

    2. Using wild card as TEXT1* has the potential to replace any other column heading or also any other text in the entire file that matches this criteria (if All matches is selected).

    3. If "only the first match" option is selected, this would not work if you want to skip the first match and replace only the second or the third.

    For ex;

    If you want to replace only the second column then using Name* wont work with the screenshot you have shared.

    VJR_0-1637124988247.png

     

    Again not sure how much flexibility you are looking for, but I'm sure you are okay with these above caveats and therefore you have gone ahead and implemented this approach.

    Good to know you have found a solution to what you were looking for 👍.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 223 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard