cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pineflatplace
New Member

Convert text columns to numbers

Hi

Is there an easy way to convert text to numbers prior to creating HTML table, so that they appear right justified and with correct decimal places?

The original source data is from an Excel spreadsheet.

I am using a Select and using item()['ExcelColumnName'] to extract the data, but it creates a text value not a numeric value.

I tried FormatNumber, but it expects the input to be a number, not a string

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @pineflatplace,

 

Can you share a screenshot of your setup and the expression you used? Can you double check if you used the correct Excel column name?

 

 

 

 

View solution in original post

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @pineflatplace,

 

You could first convert the string to float and then use the formatnumber function.

 

Try something like below:

 

formatNumber(float(item()['ExcelColumnName']), '0,0.00', 'en-us')

 

 

Thanks Expiscornovus

 

Unfortunately that gives me an error "the expression is invalid"

Expiscornovus
Super User
Super User

Hi @pineflatplace,

 

Can you share a screenshot of your setup and the expression you used? Can you double check if you used the correct Excel column name?

 

 

 

 

Hi Expiscornovus

 

Apologies, I spotted my typo.

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (3,703)