cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hughrmarks
Level: Powered On

Pulling data from just one specific cell in Excel

I have created a table in Excel that I can easily pull data from but I have a text box in PowerApps that I need to populate with data from one specific cell in that table.   How do I do that?

16 REPLIES 16
Sienna
Level 10

Re: Pulling data from just one specific cell in Excel

There are 2 ways to do that. 

 

Using LookUp

LookUp(databaseName,columnName=[what you need]).columnToDisplay

 

Or Filter

First(Filter(databaseName,columnName=[what you need])).columnToDisplay

bdodu
Level 8

Re: Pulling data from just one specific cell in Excel

First of all you create a connection to the excel (probably you already did it, if not be sure your excel is formated as a data table, here the details on how to do it)

 

IMPORTANT:  If your Excel data includes a calculated column, you can't use it to build an app, and you can’t add that data to an existing app.

 

The data in Excel is a table and to access a specific cell you have to filter the datasource for the specific row and access the column to get the cell value.

 

Ex. if you are looking for the row with ID=7 (you have to have in excel the ID column, or another unique id column) and ColumnC, the cell value to assign to the textBox is:

 

Text = First (Filter ( your_excel_file_connection, ID = 7) ).ColumnC

 

hughrmarks
Level: Powered On

Re: Pulling data from just one specific cell in Excel

The name of my table is "Roster1".   The data is in cell B3.   The column name is "First Name".

How would that be written?

 

Also, would this be in the Data >> Default box on the right side of the page?

Sienna
Level 10

Re: Pulling data from just one specific cell in Excel


@hughrmarkswrote:

The name of my table is "Roster1".   The data is in cell B3.   The column name is "First Name".

How would that be written?

 


Ok.. You might want to give us more info if you want us to do it for you.. For example

Table Name

Roadster

 

Structure of the Table:

 

ID       First_Name    B3

1         Name1           display1

2         Name2           display2

3         Name3           display3

 

I want to display "display2" in my label

 

Solution

First(Filter(Roadster,ID=2)).B3

 

Or

 

LookUp(Roadster,ID=2).B3

 


@hughrmarkswrote:

 

Also, would this be in the Data >> Default box on the right side of the page?


Can you post a screenshot of it

bdodu
Level 8

Re: Pulling data from just one specific cell in Excel

 

Is the data always in B3? Then you should select the third row in Roster1, as follows.

 

 

Add another column called RowNumber in Excel and fill the column with the incremental rowNumber. Then set the Text property of the textbox like this:

 

Text = First ( Filter (Roster1, RowNumber = 3)).FirstName

 

 

bdodu
Level 8

Re: Pulling data from just one specific cell in Excel

Also, would this be in the Data >> Default box on the right side of the page?

 

There you can find the connection to the excel file. Actual data would be in the Screen 

 

image.png

hughrmarks
Level: Powered On

Re: Pulling data from just one specific cell in Excel

Here's my Data:

data.jpg

 

And here's my PowerApps screen:

PowerAppsScreen.jpg

 

It is a text input box so "Text" is not an option above so I used "Default".   The right side of the page that I was referring to was just the other way to edit the page:

 

PowerAppsScreen2.jpg

 

bdodu
Level 8

Re: Pulling data from just one specific cell in Excel

So you need to filter after Carson Palmer? or just show whatever information is in B3? what exactly you need to put in the text box? I'm confused.

The property is Default indeed for a Textbox

 

bdodu
Level 8

Re: Pulling data from just one specific cell in Excel

And carefull - if you need to take the info from B3, I've asked you to "Add another column called RowNumber in Excel", I meant in the excel table. I cannot see the column in your picture.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 90 members 5,439 guests
Please welcome our newest community members: