Clean up a worksheet
Use worksheet state and provenance to clean up working rows.
Use this guide when a worksheet no longer makes its reasoning easy to inspect: it has duplicate answers, columns in the wrong order, stale formatting, or scores that no longer separate useful rows. It is for an operator who already has a workbook and wants to improve it without stripping away the source evidence that makes a row trustworthy. Start in Workbooks and worksheets, then use Find out why something failed when a cell or run needs diagnosis rather than a structural cleanup.
A tidy worksheet reads from left to right as an explanation: identity, derived facts, evidence, score, then contact data. The worksheet-tidy skill treats cleanup as a reversible change first. It reads the live worksheet before changing it, reports the evidence behind each finding, and reads the result again after any change or run.
Needs and produces
You need an existing workbook, its worksheet, and a clear answer to three questions: what one row represents, which criteria qualify that row, and which column identifies a duplicate. A worksheet has one live row source. If the request needs another kind of search, create another worksheet in the same workbook instead of adding a second source to the current one.
The result is not simply a nicer column list. It is a worksheet whose source, column dependencies, qualification rule, duplicate identity, and uncertain cells can be understood from the screen. The final readback names category findings, reversible edits, destructive options left untouched, credits charged by any rerun, and the link to the worksheet.
Inspect the worksheet before changing it
Open the worksheet in the Workbooks screen and read its source, every column type, each column's inputs and readers, its score rule, and a page of real rows. Architect uses the worksheet-tidy skill and the tables pack's worksheet and column reads for this inspection. It should classify findings by category and show a few example rows, rather than inferring that a count alone proves the worksheet is sound.
Look for overlapping columns, copy columns that only mirror source fields, and columns ordered before the values they depend on. Check type and formatting problems such as numbers stored as text, inconsistent dates, URLs without a scheme, or mixed casing. Also check helper columns that no one reads, raw payloads that feed a derived answer, score parts that never vary, evidence columns that are unsure on nearly every row, and gates that pass everyone or no one.
Read rows instead of relying on a total. A source run still computing a count does not establish zero rows. Empty and failed cells are separate states, and neither is zero or a false qualification answer. For a clean completion check, read duplicate counts for the identifying field, empty cells in each key column, and at least three complete rows against the stated qualification rule.
Make the smallest reversible fixes
The normal cleanup sequence is reorder, rename, hide, retype, or add a cleaned column next to the raw one. Read the current column state immediately before changing it. That avoids overwriting another member's newer edit. When the request says to tidy the worksheet, apply the reversible fixes and list archive, delete, and overwrite options separately for the user to name.
Preserve the dependency order. Place identity and profile information first, then derived facts, evidence for each criterion, a score when several criteria need weighing, and contact data last. Each required criterion should have a visible yes or no answer. Missing evidence remains unknown, not a failed criterion. A score is optional and should return a reason as well as a value when the worksheet needs to weigh several evidence columns together.
A column should answer one question. Source-owned facts remain authoritative, while labels and keyword matches are approximate and deserve independent evidence. Do not add a manual copy of a source field merely to expose it. After the source is attached, its projected fields are available as source-managed columns. Manual cell values bypass the evidence trail and should not replace a column run that can settle the cell.
- 1
Read the source and rows
Use theworksheet-tidyskill to establish what the source returned and which row identity field can expose duplicates. Check real rows in Workbooks before treating a filter or count as evidence. - 2
Map each finding to a column
Use the tables pack's column discovery and read capabilities to see current types, bindings, and dependencies. Separate a harmless hidden helper from an archived feeder that would break downstream work. - 3
Apply reversible structure edits
Reorder identity, evidence, score, and contact data; rename unclear labels; hide helpers; or add a cleaned value beside the raw field. Keep destructive choices as options rather than applying them. - 4
Rerun only the affected work
If a change needs cells settled on existing rows, use the tables pack to preview the affected row count and estimate before a live run. Do not rerun completed sample rows merely to continue the remainder. - 5
Read the result in the app
Return to the Workbooks screen. Confirm column order, visible evidence, duplicate identity, required-column completeness, and several complete rows. The readback, not the edit request, proves the cleanup happened.
Credits and completion checks
Structural reads and edits are different from provider-backed work. Adding a column can be free, while an AI normalization or an external enrichment can spend credits when it runs. A paid cleanup is a new column with its own estimate, not an overwrite of a raw value. Architect should use a small selection first, read the binding preview and its resolved row inputs, then follow the finished run before reporting a charge.
Credits shown before the run finishes are an estimate ceiling, not the amount charged. The finished run is the source for the charge. Use an inexpensive, selective qualification column before contact data so that rows that fail the test do not spend contact credits. If new rows need the same treatment later, use the worksheet's existing auto-run policy rather than rebuilding an equivalent manual field.
When it goes wrong
An empty column on every existing row usually means it never ran for those rows, or its gate reads a column that has not settled. Do not fill cells by hand. Read the upstream field and column binding, fix the missing input or dependency, and run only the necessary selection. An empty cell is unknown; a failed cell needs its own diagnosis.
A source attachment can return a repair with kind: fix_input and a repair hint. Use that hint to correct the payload, then retry the corrected input before calling the worksheet blocked. A missing connected account can prevent a source from running, but it does not prevent authoring the worksheet or attaching the planned source. Record the connection or binding still needed.
If rows look successful but do not fit the intended person, company, title, or place, treat the source filter as too loose or missing. Tighten one source input or add the missing evidence column, rerun a small sample, and read the landed rows. A daily limit on a cell is the workspace pacing cap, not a worksheet defect. If a result remains empty or wrong after the source and inputs are verified, use Find out why something failed before retrying.
Next play and leading metric
The leading signal is a worksheet where every required criterion is visible and the operator can state the qualified-row count, duplicate count, missing key-cell count, and the evidence behind three sampled rows. For a workbook model refresher, read Workbooks and worksheets. When the worksheet is clean but a run is still failing, move to Find out why something failed rather than masking the failure with a manual value.