question

GregoryRivers-7218 avatar image
0 Votes"
GregoryRivers-7218 asked

Leading zero prevents zip code from being set in cell in excel sheet.

Trying to set format for worksheet to accept zip codes into cell. Unfortunately when trying to do this it doesn't accept the leading zero. How can I set the custom format into my code.

Here is an example of my code.

   var zipFormat = [
     ["00000", "00000"],
   ];

   var numberRange = sheet.getRange("C2:D1048576");
   numberRange.numberFormat = zipFormat;
office-addins-devoffice-scripts-excel-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers