cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hughrmarks
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
Sienna
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

bdodu
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

bdodu
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

 

 

bdodu
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

 

bdodu
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

 

bdodu
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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,410)