Padding 0's to the values when it is less then 9

Reading the excel and padding zeros left to the column when the value is less then 9 but not able to format the excel column to TEXT so that not able to see the appended zeros in the column.

How can I format the excel column from general to TEXT.Main.xaml (10.4 KB)
Book1.xlsx (9.3 KB)

You can prefix a single quote ('09) to the value before writing to excel. This will retain the 0. Please keep this in mind if you want to process the excel file further.

Hi @UI_Path1
Please try this one: UI_PATH1.zip (18.7 KB)
Hope this works.
Thanks and regards.
Despi

2 Likes

Other simple options are:

  • writing the data to cells pre-configured as text - this will only work if you have control over the template to which they are written. In this case it looks like you are overwriting a file you don’t have control over, so probably not an option
  • writing the data to a new .csv file. The data is stored as a string with all characters. Note however if you open in excel as opposed to read as a .csv, the pre-formatting will be removed.

More info here: