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?

 

 

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


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')

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


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?

 

 

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi Expiscornovus

 

Apologies, I spotted my typo.

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,032)