web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Format text in excel t...
Power Apps
Answered

Format text in excel to 3 digits

(0) ShareShare
ReportReport
Posted on by 97

Hi, I'm currently patching data to an excel table.  Once of the columns, Sequence is represented in the app as a 3 digit number i.e. 1 is 001, 2 is 002 etc etc

 

I have the value formatted as text (even in the patch)

Sequence: Text(Value(Sequence),"[$-en-GB]000")

However when it is patched to the excel table the values are back to 1,2,3 etc.

 

I've looked at the following thread but none of the suggestions work for me
https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Add-leading-zeros-to-digits-using-Text/m-p/269238#M78669

 

Any help much appreciated

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @sanderson82 

    Have you tried something like this yet?  In this example I intentionally did not convert sequence to a number.

     

    If(Len(Sequence)=1,"00"&Sequence,
    	If(Len(Sequence)=2,"0"&Sequence,
    		If(Len(Sequence)=3,Sequence,false
    		)
    	)
    )

     

    You might need to change the sequence numbers back to Text in your Excel, and also changing the table column in Excel to Text before attempting my idea.  Let me know if it works!

     

    ---
    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

     

  • sanderson82 Profile Picture
    97 on at

    @mdevaney  Thankyou! That worked!  I've used your code but also, I have a flow that creates an excel from a template and then adds a table.  I went back to the orginal template and set the column to text instead of general, I'm thinking this was possibly the root cause of the issue

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard