Guide
Spreadsheet Baseline Diff Report Guide
A guide for comparing a baseline sheet against another sheet and creating a summary, full comparison report, and diff-only report with Google Apps Script.
Keep the baseline sheet as the main view and show differences with colors, notes, and management columns.
Create a comparison report for all baseline rows and a diff report for only changed, added, deleted, or key-problem rows.
Read the baseline and comparison sheets without rewriting their values or formats.
What this generator is for
This generator creates an Apps Script that compares two Google Sheets using matching key columns.
The comparison report keeps the baseline sheet layout as much as practical, appends comparison-only rows, and highlights changed cells.
The diff report uses a similar baseline-oriented layout but includes only records that need review.
Comparison targets and matching key columns
Baseline spreadsheet URL or ID
Enter the Google Sheets file that contains the baseline data. Report sheets are created in this file.
Baseline sheet name
The sheet to treat as the correct baseline. Its values and formatting are not changed.
Comparison spreadsheet URL or ID
Enter the Google Sheets file to compare against the baseline. It can be the same file or another file.
Comparison sheet name
The sheet whose differences from the baseline should be reported. Its values and formatting are not changed.
Header rows
The number of header rows at the top of the source sheet. Usually this is 1.
Matching key columns
Columns used to match the same record between the baseline sheet and the comparison sheet.
Columns to compare
Columns used for diff detection. Leave blank to compare columns that share the same header name in both sheets.
Case sensitivity
Usually disabled. Enable only when uppercase and lowercase should be treated differently.
Blank key handling
Choose whether blank key rows are included in duplicate detection.
Maximum sync rows (0 = unlimited)
Maximum rows to process during initial sync. Use 0 for no limit.
Summary sheet name
Sheet name for counts such as compared rows, changed rows, added rows, and deleted rows.
Comparison report sheet name
Sheet name for the full baseline-layout report that includes all baseline rows plus comparison-only added rows.
Diff report sheet name
Sheet name for rows that have changes, additions, deletions, or key issues.
Output reports and diff highlighting
Summary sheet
Shows totals such as matched rows, changed rows, changed cells, additions, deletions, duplicate keys, and blank keys.
Comparison report
Keeps the baseline layout as much as practical and highlights differences across all baseline rows.
Diff-only report
Lists only records that need review, such as changed, added, deleted, or key-problem rows.
Setup steps
Open Apps Script
Open Apps Script from the target spreadsheet.
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.
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.
Reload the spreadsheet
After setup finishes, reload the spreadsheet so the KOKOCAL menu appears.
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
Candidate output
Confirm that expected candidates are output to the review sheet.
No source modification
Confirm that source sheet values, row count, and column count are not changed.
Review required
Confirm that uncertain values are not forced and are marked for manual review.
Notes
Review before use
Review this point before using the generated script in production.
Important note
Review this point before using the generated script in production.
Important note
Review this point before using the generated script in production.
Review before use
Review this point before using the generated script in production.
Ready to generate the script
Compare a baseline sheet against another sheet and create a summary, full comparison report, and diff-only report while preserving the baseline layout as much as practical.
Guide
Related guides
Review these guides together with this page to make setup and operation smoother.
Getting started
Review the input column, generated result column, code, setup steps, review points, and JSON menu.
Apps Script basics
Review .gs files, HTML files, saving, first authorization, triggers, and other basics before setup.
Using multiple scripts
Learn how to organize KOKOCAL_Menu.gs, feature files, the shared menu, triggers, and permissions when combining generated scripts.