Aller au contenu
Skillpedia
PDF, Word et présentations7.8k · #12876

excel-subtotal-audit

Ce qu’il fait

Ce skill est une méthode pour contrôler un rapport Excel une fois créé, afin de confirmer que les totaux incluent les bonnes lignes. Il s'adresse aux personnes qui produisent des feuilles de calcul financières ou de synthèse avec des sous-totaux.

Quand l’utiliser

  • ✓Quand j'ai généré une feuille de calcul contenant des formules de sous-total ou de total.
  • ✓Quand certaines sections contiennent des lignes vides, masquées ou filtrées qui peuvent fausser les totaux.
  • ✓Quand un fichier s'ouvre sans problème mais que je dois encore savoir si les chiffres sont justes.

Lien du skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/excel-subtotal-audit/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/excel-subtotal-audit/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“J'ai généré un rapport avec des sous-totaux. Relis-le et confirme que chaque sous-total inclut toutes les lignes de détail de sa section.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'IA lit le classeur finalisé, affiche chaque ligne remplie avec ses formules, repère les lignes de sous-total, et vérifie que chaque formule couvre la plage de détail prévue.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Excel Subtotal Audit

Use this workflow after generating or modifying an Excel report to catch silent spreadsheet defects that simple file-exists or sheet-exists checks will miss.

The core idea is:

  1. Read back the finished workbook.
  2. Print every populated output row, including formulas.
  3. Identify section subtotal rows.
  4. Independently verify that each subtotal formula includes all visible detail rows intended for that section.
  5. Treat any mismatch as a report defect, even if the workbook opens successfully and looks formatted correctly.

This is especially useful for generated financial statements, operational summaries, rollups, grouped exports, and any worksheet where formulas summarize nearby detail rows.

When to use

Use this skill when:

  • You generate Excel workbooks programmatically.
  • The workbook contains subtotal, total, or rollup formulas.
  • Sections may contain blank rows, hidden rows, filtered rows, or varying detail lengths.
  • A mistake in a formula range would produce a plausible but wrong spreadsheet.
  • Basic validation only checks whether the file was created, whether sheets exist, or whether formulas are present.

Goal

Do not stop at "the report was written successfully."

Instead, prove that:

  • every expected output row is present,
  • formulas were written into the intended cells,
  • each subtotal references the correct detail range,
  • no visible detail rows are omitted from the subtotal span.

Workflow

1. Save the workbook, then reopen it for audit

Always audit the workbook after writing it, using a fresh read from disk if possible. This verifies the actual persisted artifact rather than in-memory assumptions.

Checklist:

  • Save workbook.
  • Reopen workbook from disk.
  • Select the target worksheet.
  • Use formula view or raw formulas, not only calculated values.

Why: a writer may have inserted the wrong range, overwritten cells, or shifted rows during formatting.

2. Enumerate every populated row in the output region

Print a row-by-row audit log of all populated rows in the report area.

For each row, print:

  • row number,
  • displayed labels or key identifiers,
  • numeric cells,
  • raw formulas for formula cells,
  • whether the row is hidden, if your library exposes that,
  • any grouping/outline level if relevant.

This creates a human- and machine-inspectable trace of what the generator actually produced.

Minimum row audit format

A useful printed line looks like:

  • Row 12: ["Revenue", 1250, "=SUM(B8:B11)"]
  • Row 13: hidden ["Adjustment", 25, ""]
  • Row 14: ["Total Revenue", "", "=SUM(B8:B13)"]

The exact format does not matter as much as consistency and inclusion of formulas.

What counts as populated

A row is populated if at least one relevant output cell contains:

  • a value,
  • a string label,
  • a formula,
  • formatting that corresponds to a semantic output row you need to validate.

Prefer auditing a defined report column range rather than the entire sheet.

3. Locate subtotal rows explicitly

Identify rows that represent subtotals, totals, or section summaries.

Common signals:

  • a label like "Subtotal", "Total", "Net", "Gross", "Section Total",
  • a formula in a numeric column,
  • bold or styled summary rows,
  • known report structure from the generator.

For each subtotal row, capture:

  • section name or identifier,
  • subtotal row number,
  • subtotal formula text,
  • the expected detail row span according to neighboring visible rows and section boundaries.

Do not assume the formula is correct just because a subtotal row exists.

4. Independently derive expected detail coverage

This is the key step.

For each section, determine which visible detail rows should contribute to the subtotal without using the subtotal formula itself as the source of truth.

Possible ways to derive the expected rows:

  • rows between the section header and the subtotal row,
  • rows until the next section header,
  • rows matching a known indentation or outline level,
  • rows with detail labels but excluding headers and subtotal labels,
  • rows included by the source data mapping used to build the section.

The important rule:

The expected detail set must be computed independently from the formula being checked.

Otherwise, the audit only repeats the original mistake.

Include only visible detail rows when visibility matters

If the report hides rows, collapses groups, or applies filters, inspect whether the subtotal is supposed to summarize:

  • all underlying rows, or
  • only
Questions fréquentes

Une simple vérification de l'existence du fichier suffit-elle ?

Non, le guide indique que les contrôles simples ne détectent pas les mauvaises plages de formules ; les totaux doivent donc être vérifiés.

Qu'est-ce qui constitue un écart ?

Une formule de sous-total qui n'inclut pas toutes les lignes de détail visibles de sa section.

Quelles lignes sont contrôlées ?

Chaque ligne de sortie remplie, avec ses formules, ainsi que les lignes vides, masquées ou filtrées.

Détails

Description originale de l’auteur

Audit generated Excel reports by enumerating populated output rows, exposing formulas, and checking that each subtotal range includes all visible detail rows.

repo: HKUDS/AgentPilot

Popularité

Étoiles GitHub
7.8k
Position au classement
#12876
Licence
MIT
Mis à jour
01/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires