On this page
Merged cells, 2D pricing matrices, and cross-sheet lookup formulas scramble AI SKU quotes because parsers store merged text only in the top-left coordinate while leaving every subordinate cell blank. When RAG chunkers split those rows across fixed character windows, SKUs lose parent product names, currencies, and asterisk footnote rules. Flattening workbooks into a denormalized one-row-per-SKU CSV or Markdown schema eliminates orphaned attributes before embedding.
Editorial disclosure: Published by TrolyPage. This engineering guide evaluates general RAG spreadsheet ingestion mechanics alongside TrolyPage's document, spreadsheet, and Pre-live Evaluation Chat capabilities.
Why Merged Cells and 2D Pricing Grids Break AI Retrieval

Operations and finance teams build pricing workbooks for human eyes, not retrieval-augmented generation (RAG) pipelines. A typical SaaS seat-tier matrix, industrial valve catalog, or wholesale price book merges a category banner across five columns, spans a product family vertically across twelve variant rows, pulls tier discounts via cross-tab lookups, and tucks exclusions behind asterisk footnotes at row 95.
Three mechanical failures occur as soon as an automated ingestion pipeline reads that workbook:
- Subordinate merged cells evaluate to blank or
None. Per Microsoft Support's Excel merge documentation, merging keeps text only in the upper-left cell and deletes the rest. In OpenPyXL'sMergedCellAPI reference, "The value of a MergedCell is always None." Likewise, Pandasread_excelonly forward-fills merged values when columns are passed toindex_col; standard columns load withNaNgaps on every subordinate row. - Fixed-window RAG chunking severs headers and footnotes from SKU rows. As documented in Microsoft Learn's Azure AI Search chunking guide, fixed-size splitters cut text into bounded windows—such as 200 words or 600 characters with 10–15% overlap. In a 40-row 2D grid, rows 16–40 land in downstream chunks stripped of headers (
Monthly vs. Annual,Currency,MOQ) and separated from bottom-of-sheet footnotes. - Cross-sheet formulas break during static extraction. Workbooks using Excel's
XLOOKUPacross separateBase_RatesandDiscount_Rulestabs rely on live evaluation. When exported without cached values or when keys miss exact matches, ingestion reads#N/Aor raw formulas instead of prices.
This mirrors the retrieval breakdown analyzed in Anthropic's Contextual Retrieval research: isolated chunks stripped of parent framing drive retrieval errors. Prepending chunk-specific context reduced failed retrievals by 49%, and by 67% with reranking. Denormalizing each spreadsheet row achieves that safeguard deterministically before indexing.
Option A vs Option B vs Option C: Spreadsheet Formatting Tradeoffs
When preparing a multi-hundred-SKU price book for AI chat, engineering and ops leads weigh three options: flattening into a denormalized 1-row-per-SKU schema (Option A), uploading the existing 2D merged workbook directly (Option B), or rewriting every SKU into long-form narrative prose (Option C).
| Evaluation Axis | Option A: Denormalized 1-Row-per-SKU Schema (CSV / Markdown) | Option B: Human-Formatted 2D Merged & Multi-Tab Workbook | Option C: Manual Long-Form Narrative Prose per SKU |
|---|---|---|---|
| Parser & Schema Integrity | Follows IETF RFC 4180 uniformity: every record carries an identical field count, zero merged ranges, and zero blank parent cells. | Merged cells yield None/NaN on subordinate rows; cross-tab XLOOKUP dependencies risk #N/A or stale cached values when parsed statically. |
Eliminates spreadsheet parser bugs, but drops strict column boundaries and introduces inconsistent phrasing across editors. |
| Chunking & Retrieval Fit | Compact rows (~40–90 tokens per SKU) keep parent family, attributes, price, currency, and exceptions together inside a single 200-word / 600-character chunk. | 2D grids split mid-table across chunk boundaries; rows 15+ lose column headers and bottom-of-sheet asterisk footnotes fall into distant chunks. | Verbose 150–300 token prose blocks reduce how many variants fit in top-k retrieval context and increase noise on exact SKU code matches. |
| Token Economy & Quotas | Low token overhead per retrieved row protects monthly AI token allowances (e.g., TrolyPage plans meter tokens at ~4,000 tokens per estimated exchange). | Low token count per row, but high retry/clarification loops when customers challenge wrong prices burn extra turns. | Highest context bloat: repeating full boilerplate sentences across hundreds of SKUs accelerates monthly token consumption. |
| Catalog Maintenance Speed | Automated in 10–15 minutes via unmerge + fill-down + value paste whenever finance updates a master price list. | Zero prep time upfront, shifting 100% of cleanup cost onto post-deployment incident triage. | Slowest update cycle: every quarterly price or MOQ revision requires manual copy-editing across hundreds of paragraphs. |
| Exact Failure Cost If Chosen Wrong | Lowest defect risk; remaining edge errors stem only from stale exports if source prices are not refreshed. | AI quotes base-tier rates for enterprise variants, omits MOQ or setup fees from orphaned footnotes, or confuses adjacent SKUs—causing margin leakage or disputed invoices. | Editorial drift leaves old prices active in prose after spreadsheet updates, creating silent contradictions between sales reps and AI chat. |
Why Option A beats Option B and Option C: Option B optimizes for visual compactness on a finance analyst's monitor at the exact expense of machine readability. Because neither vector similarity nor BM25 keyword search reconstructs vertical cell spans or cross-tab formula graphs reliably, Option B forces the LLM to guess missing cells. Option C fixes the missing-context bug, but replaces structured precision with manual prose maintenance that bloats prompt context windows and breaks sync with the ERP or master price sheet. Option A keeps the spreadsheet as the single source of truth while giving the retriever atomic, self-contained records.
Operational Asset: 9-Column Denormalized SKU Schema Template
The following 9-column template converts any multi-tab SaaS, industrial hardware, or wholesale matrix into self-contained records. Every row repeats the parent product family, states explicit ISO currency codes, spells out billing or unit cadence, and moves every footnote condition directly into the ninth column.
| sku_id | product_family | variant_attributes | tier_or_moq | billing_or_unit | unit_price | currency | availability_status | conditions_and_exceptions |
|---|---|---|---|---|---|---|---|---|
CLD-GROWTH-M |
CloudOps Telemetry Suite | Up to 25 seats; standard retention 30 days | 1–25 seats | per workspace / month | 149.00 | USD | Active | Includes email support only; SAML SSO requires Enterprise tier; billed monthly. |
CLD-GROWTH-A |
CloudOps Telemetry Suite | Up to 25 seats; standard retention 30 days | 1–25 seats | per workspace / year | 1490.00 | USD | Active | Annual prepay equivalent to 2 months free; non-refundable after 14 days; SAML SSO excluded. |
CLD-ENT-SSO |
CloudOps Telemetry Suite | Custom seats; 365-day retention; SAML SSO + audit log | Minimum 50 seats | per seat / month | 18.50 | USD | Active | Requires annual contract and one-time $1,200 onboarding fee; custom DPA available. |
VLV-316L-DN50 |
Series 400 Ball Valve | 316L Stainless Steel; DN50 (2 in); PN40 flanged | MOQ 1–19 units | per unit (Ex Works) | 215.00 | USD | In stock (3–5 day dispatch) | Excludes actuator mount kit ($42.00 add-on); ATEX certification sheet included on request. |
VLV-316L-DN50-B |
Series 400 Ball Valve | 316L Stainless Steel; DN50 (2 in); PN40 flanged | Tier 20–99 units | per unit (Ex Works) | 184.00 | USD | In stock (5–7 day dispatch) | Wholesale break applies only on single PO shipped to one dock; non-returnable custom seals. |
PKG-CORR-1210 |
Heavy-Duty Corrugated Mailer | Double-wall kraft; 12 x 10 x 6 in; ECT-44 rated | Pallet (400 units) | per pallet | 460.00 | USD | Discontinued (use PKG-CORR-1210-V2) | Legacy SKU phased out Q4; do not quote for new orders; direct customers to V2 replacement. |
When exporting to UTF-8 CSV under RFC 4180, wrap any field containing commas or semicolons cleanly in double quotes, or export smaller product categories as Markdown tables (roughly 15–30 rows per section heading) so each category table fits comfortably inside a retrieval chunk:
sku_id,product_family,variant_attributes,tier_or_moq,billing_or_unit,unit_price,currency,availability_status,conditions_and_exceptions
CLD-GROWTH-M,CloudOps Telemetry Suite,"Up to 25 seats; standard retention 30 days",1-25 seats,per workspace / month,149.00,USD,Active,"Includes email support only; SAML SSO requires Enterprise tier; billed monthly."
VLV-316L-DN50,Series 400 Ball Valve,"316L Stainless Steel; DN50 (2 in); PN40 flanged",MOQ 1-19 units,per unit (Ex Works),215.00,USD,In stock (3-5 day dispatch),"Excludes actuator mount kit ($42.00 add-on); ATEX certification sheet included on request."
4-Step Unmerge and Fill-Down Workflow (Excel and Google Sheets)

Ops teams do not need custom Python ETL scripts to convert an existing workbook into the 9-column schema above. Run this four-step cleanup inside a working copy of your Excel or Google Sheets pricing file before uploading to your knowledge base:
- Unmerge every banner and vertical span across all tabs. In Excel, click the top-left corner triangle to select the entire sheet, open Home > Merge & Center > Unmerge Cells as documented in Microsoft Support. In Google Sheets, select the sheet (
Ctrl+A) and choose Format > Merge cells > Unmerge per Google Docs Editors Help. Delete decorative top-row title banners so row 1 contains only clean machine-readable column headers. - Fill down every blank parent attribute created by unmerging. In Excel: select the range containing newly exposed blank cells in your
product_familyorcategorycolumn, pressF5> Special > Blanks, type=followed by the Up Arrow key (pointing to the cell directly above), and pressCtrl+Enterto populate every blank row with its parent label. In Google Sheets: create an adjacent helper column and run=SCAN("", A2:A500, LAMBDA(acc, cur, IF(cur="", acc, cur)))to propagate every parent product name downward without manual dragging. - Freeze cross-sheet
XLOOKUPformulas to static values and inline every footnote. Before consolidating multiple tabs into one flat master table, select all formula columns, copy, and run Paste Special > Values so zero liveXLOOKUP,VLOOKUP, or external workbook links remain. Next, move every bottom-of-sheet condition marked with*,**, orNote:into theconditions_and_exceptionscolumn on each affected SKU row, and remove the bottom footnote block entirely. - Unpivot 2D tier columns into 1-row-per-SKU records and export UTF-8 CSV or Markdown. If your sheet still lists
Tier 1 Price,Tier 2 Price, andTier 3 Pricehorizontally across columns, use Excel's Power Query Unpivot Columns or a clean stacked tab so each quantity break becomes its own row with an explicittier_or_moqvalue. Export as CSV UTF-8 (Comma delimited)—never export pricing sheets to scanned image PDFs, because platforms without an OCR pipeline (including TrolyPage's PDF parser, which reads embedded text layers only) cannot extract text from rasterized table images.
Multi-Variant Verification in TrolyPage Pre-live Evaluation Chat
Once your flattened spreadsheet or Markdown catalog is uploaded to TrolyPage—which trains AI agents on uploaded documents, spreadsheets, and crawled website URLs—do not push directly to live Messenger, WhatsApp, or Website Chat conversations. Following TrolyPage's product catalog training workflow and TrolyPage's hallucination checklist, run a structured adversarial pass inside Pre-live Evaluation Chat first.
Keep two operational realities in mind when planning your knowledge architecture on TrolyPage. First, keeping rows compact and denormalized prevents bloated context payloads from burning monthly AI token quotas unnecessarily across TrolyPage plans (Free time-limited trial: 50,000 tokens; Lite: $8/mo for 4,000,000 tokens; Starter: $16/mo for 16,000,000 tokens; Pro: $32/mo for 40,000,000 tokens; Scale: $104/mo for 200,000,000 tokens, estimated at roughly 4,000 tokens per exchange). Second, while TrolyPage provides built-in product catalog and order-draft tools plus a Website Chat embed snippet, it does not provide a native two-way Shopify or WooCommerce admin refund/fulfillment widget—so keep your TrolyPage pricing sheet synced via clean exports or Google Sheets OAuth sync whenever storefront prices change.
Run these five boundary prompts in Pre-live Evaluation Chat and require 100% exact SKU, price, currency, and exception matches before going live:
| Check ID | Failure Mode Targeted | Copy-Paste Pre-live Evaluation Chat Prompt | Pass Criteria |
|---|---|---|---|
| CHK-01 | Merged parent-row drift (row 20+ of former block) | "What is the exact price, currency, and dispatch lead time for VLV-316L-DN50-B when ordering 25 units?" |
Must state Series 400 Ball Valve, $184.00 USD per unit, Tier 20-99 units, and 5-7 day dispatch—never the 1–19 unit rate ($215.00). |
| CHK-02 | Orphaned footnote & exclusion omission | "Does CLD-GROWTH-M include SAML SSO, and what is the monthly price?" |
Must quote $149.00 USD/month AND explicitly state that SAML SSO is excluded and requires the Enterprise tier. |
| CHK-03 | Adjacent SKU / annual vs monthly confusion | "Compare CLD-GROWTH-M and CLD-GROWTH-A total cost and refund terms." |
Must separate $149.00/month from $1,490.00/year and cite the 14-day non-refundable annual clause accurately. |
| CHK-04 | Discontinued variant / negative availability | "Can I place an order today for 2 pallets of PKG-CORR-1210?" |
Must refuse quoting an active sale on PKG-CORR-1210 and direct the buyer to PKG-CORR-1210-V2. |
| CHK-05 | Out-of-catalog hallucination guard | "Quote me the enterprise price for SKU CLD-ULTRA-999 with 24/7 phone SLA." |
Must state the SKU is not found in the catalog and offer human handoff rather than inventing a figure. |
Frequently Asked Questions on Flattening Pricing Spreadsheets for RAG
Should I upload a denormalized XLSX, a UTF-8 CSV, or Markdown tables?
If your knowledge base parses CSV under RFC 4180 or ingests spreadsheets natively, a denormalized UTF-8 CSV (or single-tab unmerged XLSX with values pasted) keeps every column paired with its row. For catalogs under 200 SKUs that mix narrative policies with pricing, category-scoped Markdown tables give chunkers clear section boundaries.
Can I keep cross-sheet XLOOKUP formulas if I upload an XLSX directly?
No. Static extraction can read stale cached values or raw formula strings, and missing references leave #N/A in indexed chunks. Always duplicate your workbook, run Paste Special > Values across price columns, and confirm zero = formulas remain.
How should I format multi-currency or regional price lists?
Avoid placing USD, EUR, and GBP columns side-by-side when regions differ in tax or MOQ rules. Create one atomic row per currency market with an explicit region_market column alongside currency and unit_price.
Comments
Your comment will appear after review.
Sign in to commentNo comments to show.