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 Apps / Pasting Excel table in...
Power Apps
Answered

Pasting Excel table into text input

(0) ShareShare
ReportReport
Posted on by 860
Is there an easy way to paste Excel tables from the clipboard to our apps? What I want to accomplish is for example I have this table: 

If I paste into a multiline text input it pastes like this: 

I need all data of every column in a different text label to have the info of each column separated by a space, as its shown in the image. so, 4 text labels, one with "1 2 3", "A B C", "I II III" and "One Two Three"
Is this possible?
Categories:
I have the same question (0)
  • Verified answer
    Gil0 Profile Picture
    133 on at
     
    Adding the following formula to your label's Text property should accomplish transposing your rows into columns:
     
    With(
        {
            words: Split(Substitute(Trim(ipt_YourTextInputControl.Text), Char(10), " "), " "),
            numCols: 4,
            numRows: CountRows(Split(Substitute(Trim(ipt_YourTextInputControl.Text), Char(10), " "), " ")) / 4
        },
        Concat(
            Sequence(numCols) As colIndex,
            Concat(
                Sequence(numRows) As rowIndex,
                Last(
                    FirstN(
                        LastN(words, CountRows(words) - (rowIndex.Value)*numCols),
                        colIndex.Value
                    )
                ).Value & " "
            ) & Char(10)
        )
    )
    Just make sure to replace "ipt_YourTextInputControl" to your actual input control's name.
     
    If my response helped figure out the issue, please mark as resolved so it helps direct others.
     
  • WorkingRicardo Profile Picture
    860 on at
    @Gil0 hey thanks for your reply :)
    This works but it just realised I explained incorrectly what I needed.
     
    I have 4 text labels, and I need that each shows a different column. So textLabelA would be 1 2 3", "A B C", "I II III" and "One Two Three".
     
    Been trying to fiddle with the provided code to get this but can't seem to get it to work to do this. 
     
    Sorry for the inconvenience. How would I acheive this? And thanks in advance!
  • WorkingRicardo Profile Picture
    860 on at
    @Gil0 hey again! I managed to get the outcome wanted with this code below :) 
    With(
        {
            words: Split(Substitute(Trim(DataCardValue2.Text); Char(10); " "); " ");
            numCols: 4;
            numRows: CountRows(
                Split(Substitute(Trim(DataCardValue2.Text); Char(10); " "); " ")
            ) / 4
        };
        Concat(
            Sequence(numRows) As rowIndex;
            Last(
                FirstN(
                    LastN(
                        words;
                        CountRows(words) - ((rowIndex.Value - 1) * numCols)
                    );
                    1   // columna 1
                )
            ).Value & " " & Char(10)
        )
    )
    
    I'll put your post as the answer as I used that as a basis. Thanks a lot :)

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard