cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

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
Memorable Member
Memorable Member

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

Responsive Resident
Responsive Resident

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

 

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?


@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

Responsive Resident
Responsive Resident

 

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

 

 

Responsive Resident
Responsive Resident

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

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

 

Responsive Resident
Responsive Resident

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

 

Responsive Resident
Responsive Resident

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Users online (7,221)