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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Write data in E...
Power Automate
Unanswered

How to Write data in Excel as text

(0) ShareShare
ReportReport
Posted on by 14

Hi All,

 

Sorry that might be a stupid question but i haven't find anything about that in google.

I have very silly issue but cant solve it.

i have product code looks like that 0000005 but when i read data and write to another workbook excel automatically convert data to 5. even if the data as text. please see screenshoots.

 

I really need this any help will be good

 

photo5301227079632796890.jpg

photo5301227079632796889.jpg

photo5301227079632796888.jpg

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Have you tried adding an apostrophe in front....ex '000005 

     

    The apostrophe tells Excel that it is text.  It exists in the "text value" but disappears on display.  Good luck!

  • Guriga Profile Picture
    188 on at

    Is the other Excel spreadsheet already saved?

    If yes, format the specific cell as text instead of general.

  • Alfi_al Profile Picture
    14 on at

    If im using find and replace it takes forever to replace all zeros it takes forever. is there any quick way to add an apostrophe in front and make it in flow? 

  • Alfi_al Profile Picture
    14 on at

    not sure what you mean? 

  • Guriga Profile Picture
    188 on at

    The file you write the data into it it is created by the flow or already saved somewhere?

  • Alfi_al Profile Picture
    14 on at

    The file already saved. the thing is that i have to edit about 37k cells it takes forever for PAD. 

  • VJR Profile Picture
    7,635 on at

    Hi @Anatoliy1992 

     

    Since you have those many number of rows and also that PAD does not yet have any inbuilt action for formatting cells you will need to use something like a script.

     

    If you are fine to use a vbscript then take a look at my post here.

    Clicking the above link will directly take you to the post.

     

    The only change that you need to do is:

    - From the vbscript, remove code line numbers 7 to 11
      and instead write
      objExcel.Range("%FromRange%" & ":" & "%ToRange%").NumberFormat = "000000"

     

    In the above line modify the number of 0's as per your requirement.

     

    Please try this on a backup file before doing it on the original Excel.

     

  • Guriga Profile Picture
    188 on at

    You misunderstand me. 

    Open the saved Excel file. Select the column and change it from General to Text and save the file again.

    Guriga_0-1647597544398.png

     

    So when the PAD will write into that cells it will be text and keep the 00000 in the front.

  • Alfi_al Profile Picture
    14 on at

    I have changed data import, now it import data by power query and i can set up any type of fields. 

    Thank you all for your help! 

  • HazemSaleh Profile Picture
    29 on at

    Im using this but always show in excel !! 
    Is iam missing something? 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard