KOKOCAL SCRIPT

Guide

Spreadsheet Postal Code Formatting Guide

A guide for normalizing postal code notation and outputting conversion candidates without changing source data.

Published: Aug 3, 2026Updated: Aug 6, 2026
7-digit normalization

Normalize full-width digits, spaces, postal marks, and hyphens.

Review-first design

Invalid or incomplete values are marked for review.

Non-destructive output

Candidates are written to a review sheet before any manual change.

What this generator is for

This generator creates an Apps Script that reads postal codes from a selected column and outputs normalized candidates.

It can produce hyphenated or digits-only notation after extracting a 7-digit postal code.

It does not verify whether a postal code exists or matches an address.

Target sheet and postal code column

Source spreadsheet URL or ID

Enter the Google Sheets file to use as the source. You can paste the full URL or only the file ID.

Source sheet name

The sheet that contains the data to process.

Header rows

The number of header rows at the top of the source sheet. Usually this is 1.

Target column

Column containing the values to format.

Formatting mode

Choose how the formatted candidates are generated.

Review sheet name

Sheet name where review results will be written.

Postal code formatting patterns

7-digit normalization

Extracts digits after removing postal marks, spaces, full-width characters, and hyphens.

Hyphenated or digits-only

Outputs either 123-4567 or 1234567 depending on the selected mode.

Needs review

Values that cannot be normalized to seven digits are marked for review.

Setup steps

1

Open Apps Script

Open Apps Script from the target spreadsheet.

2

Paste the generated files

Create KOKOCAL_Menu.gs and the generated tool-specific .gs file in Apps Script, then paste each generated file into the matching Apps Script file. Back up existing code before editing it.

3

Run initial setup

Run the setup function from the function dropdown to create the review sheet and register the tool in the shared KOKOCAL menu.

4

Reload the spreadsheet

After setup finishes, reload the spreadsheet so the KOKOCAL menu appears.

5

Run from the menu

Run the generated tool from the menu and review the output sheet.

Save the implementation guide

After generating the script, use Download setup guide at the top right of the generated result column to save the information needed for setup. Generated results disappear when you leave the page, so saving the guide before setup is recommended.

Post-setup review points

1

Candidate output

Confirm that expected candidates are output to the review sheet.

2

No source modification

Confirm that source sheet values, row count, and column count are not changed.

3

Review required

Confirm that uncertain values are not forced and are marked for manual review.

Notes

Important note

Review this point before using the generated script in production.

Source sheet is not changed

The address or facility name is only read from the configured cell. Location details and map images are created on the dedicated output sheet.

Review before use

Review this point before using the generated script in production.

Ready to generate the script

Normalize postal code formats and output conversion candidates to a review sheet without changing source data.

Open generator