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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (4,666)