cancel
Showing results for 
Search instead for 
Did you mean: 

Text Align in datatable column in PowerApps

Hi Team,

 

I am binding datatable in PowerApps to an Excel but the data in columns seems left align always and there is no option to centre align the data.

 

Can you please add this feature?

Status: New
Comments
sbeckles
Regular Visitor

Hi

 

I wanted to right align my number columns and I searched online only to find out that there isn't a solution out there.  However, I came up with a way to right align a data table column. It it is not elegant but it worked. You can use the text property to format your values. Here is the formula that I used:

Right(Substitute("xxxxxxxxxxxxxx", "x", Char(127)) & Text(ThisItem.YourColumnName, "#,###,0.00"), 14)

 

In this case, I wanted a numeric column to be right aligned within 14 characters. So I packed a non printable character in front of the numbers up to a length of 14. A space didn't work because only one is displayed.  I checked the ASCII table for another character that would be repeated but not shown and came up with ASCII code 127 (DEL).