A custom Contact Form 7 reporting job reads four Google Sheets columns, but one returned row contains only two values. That does not automatically mean the lead lost two fields. The values API omits trailing empty cells. Rebuild the expected rectangle deliberately, preserve positions inside each row, and keep blank-cell interpretation separate from missing-record detection.

This guide concerns a reader you maintain after inquiries have reached a sheet. It does not establish a native Sheets connector in CF7 Analytics. The examples use synthetic inquiry references and a small bounded range, without reading or changing a live spreadsheet.
Understand the shape Sheets returns
The ValueRange reference explains that the response range can cover the requested rectangle while values excludes trailing empty rows and columns. With ROWS as majorDimension, each inner array represents a row. Its length is therefore not a dependable declaration of your table’s schema.
Imagine a request for Intake!A2:D4. Your contract assigns A to inquiry_id, B to service, C to region and D to campaign. A response may contain a complete first row, a second row ending at service, and no final row because it is empty. Keep the requested width and height in your reader instead of inferring them from the longest returned array.
Preserve internal gaps and trailing gaps differently
An empty value between populated cells still occupies a position. Removing every empty string before mapping values shifts later answers into the wrong columns. Padding the end of an array is different: it restores expected empty positions after the final returned value. Never compact a row as a general cleanup step.
Google’s reading examples illustrate response shapes and major dimensions. Set majorDimension explicitly in the request and validate it in the response. A reader written for row arrays must not accidentally interpret a COLUMNS response using the same indexing.
Reconstruct a bounded rectangle
The following isolated Python example represents three requested rows and four requested columns. It restores trailing positions without filtering out zeros, false values or internal empty strings. The missing third inner array becomes an empty row in the normalized view.
returned = [
["demo-a", "Reporting", "", "spring"],
["demo-b", "Training"]
]
height, width = 3, 4
if len(returned) > height:
raise ValueError("Unexpected row count")
rectangle = []
for index in range(height):
row = returned[index] if index < len(returned) else []
if len(row) > width:
raise ValueError("Unexpected column count")
rectangle.append(row + [""] * (width - len(row)))
assert rectangle[0][3] == "spring"
assert rectangle[1] == ["demo-b", "Training", "", ""]
assert rectangle[2] == ["", "", "", ""]
This normalization policy uses empty strings for absent trailing positions because the downstream view needs text-shaped cells. It does not prove whether a physical cell is untouched, intentionally cleared or formula-driven. Retain the original response when your approved troubleshooting policy requires it, and document what the normalized representation means.
Do not turn an empty row into a missing lead
The third normalized row has no inquiry reference. Treat it as an empty row in the selected range, not as evidence that a specific inquiry failed delivery. Missing-lead reconciliation needs an expected population and stable inquiry references. A three-row rectangle is a coordinate boundary, not a promise that exactly three inquiries exist.
Likewise, a nonempty service with an empty inquiry_id is an exception to investigate. Do not fabricate an ID from the row number. Sorting, insertion and deletion can move records. If you use row-bound identifiers, review our developer-metadata guide and establish its own matching rules.
Choose value rendering deliberately
The values.get reference documents rendering options. Decide whether the task needs formatted presentation, unformatted values or formulas. Display text and stored numeric values can differ, especially for dates, percentages and currency. A blank-looking result should not trigger a destructive update elsewhere.
Use the separate date-serial guide when your reader receives numeric dates. Keep inquiry identifiers as identifiers even if they look numeric. In downstream code, distinguish an absent array position from an actual false or zero value. Truthiness-based cleanup can erase legitimate answers.
Validate headers before labeling normalized cells
Padding restores width, but it cannot repair a changed column contract. Read and verify the expected header, or use your deliberately designed name-to-position mapping. A rectangular row under the wrong headers is still wrong. The values guide covers the underlying read operations; your adapter must supply the business interpretation.
Keep raw intake and derived reporting views separate when possible. If a teammate adds a display column to the report, the intake reader should either remain bound to its reviewed schema or stop with a clear mismatch. Do not silently widen the schema merely because a response contains another value.
Exercise the edge cases before scheduling
Build local fixtures for a complete row, a trailing blank, an internal blank before a populated campaign, an entirely empty response, zero, false and an unexpected extra column. Check both cell positions and the final labeled record. Include a non-A starting column so code does not confuse local array index zero with sheet column A.
In authorized staging, read the same bounded range using your intended rendering option and compare it with the cell view. Keep the request, returned range and normalization policy with the run receipt. These checks are proposed acceptance work, not a claim that your sheet was tested.
Interpret trends after the data shape is sound
This site publishes CF7 Analytics. For WordPress submission statistics, review our free Svetlik Analytics for Contact Form 7. Spreadsheet ingestion, raw-answer transformations and destination reconciliation require their own verified implementations. Stable reporting begins with preserving what each cell position means, then explaining which records the report actually covers.
Official references checked November 20, 2026. The fixture demonstrates a reconstruction policy; it does not measure live delivery, lead volume or inbox receipt.
