# agent csv import failed on duplicate header rows questionnaire: how to fix it

Exports that concatenate multiple reports repeat the header row throughout the file. Strip every header row after the first before parsing.

```text
agent csv import failed on duplicate header rows questionnaire
```

## When to use this skill
- CSV import fails on repeated header rows
- Questionnaire answers shift columns mid-file

## When not to use this skill
- Single header imports fine (not a header issue)
- Headers differ between repeats (a schema issue)

## Tool compatibility
Agent CSV header preprocessing. Related area: data pipelines.

Related area: proposal automation and agent-assisted RFP workflows.

Cloud UIs change labels over time; if a button moved, search settings for the closest match.

## Before you start
- Sign in to the tool and keep one tab open so sessions stay clean
- Copy the exact error text and note the time it happened
- Set aside 15 to 20 minutes; most of these resolve in a single pass

## Quick diagnosis
Make sure this is the right skill before you invest the 15 minutes.
- If you are dealing with cSV import fails on repeated header rows, start at step 1 below.
- If instead single header imports fine (not a header issue), stop here; you need a different skill.
- If neither quite matches, compare your screen against the verbatim error block at the top; that block is exactly what this skill covers.

## Fix it in steps
### 1. Find the repeated headers

```
Scan the file for rows that match the header text.
```
Expected: Expected: header repeats located at intervals.

### 2. Keep only the first header

```
Delete every header row except the first.
```
Expected: Expected: one header row remains at the top.

### 3. Validate the row count

```
Count data rows before and after the strip.
```
Expected: Expected: difference equals the removed headers.

### 4. Parse the cleaned file

```
Run the import on the cleaned file.
```
Expected: Expected: all rows import into correct columns.

## Confirm each step worked
Run through this checklist before moving on. If a check fails, redo that step instead of pushing ahead.
- Step 1 (find the repeated headers): Expected: expected: header repeats located at intervals.
- Step 2 (keep only the first header): Expected: expected: one header row remains at the top.
- Step 3 (validate the row count): Expected: expected: difference equals the removed headers.
- Step 4 (parse the cleaned file): Expected: expected: all rows import into correct columns.

## Quick recap
1. Find the repeated headers
2. Keep only the first header
3. Validate the row count
4. Parse the cleaned file

## Still stuck?
Gather three things: the exact error text, the time it happened, and what changed just before it broke.
Check the vendor status page for an active incident. Then open a support ticket with those three things;
it cuts the back-and-forth in half. For agent runs, attach the last 50 lines of the agent log too,
since the loop or timeout signature in the log usually names the cause.

## Variant phrasings
### agent csv duplicate headers failed
Strip repeats, keep the first. If this matches what you saw, the steps above apply as written.

### agent questionnaire csv header rows error
Preprocess before parsing. If this matches what you saw, the steps above apply as written.

## Why it happens
Concatenated exports repeat headers at each chunk boundary, and parsers treat the repeat as a data row with text in every column. Stripping repeats is a preprocessing step the agent must do before parsing.

## Edge cases
- Detect header repeats by matching the exact header text, not by position
- Some exports also repeat footers; strip those too
- Keep the raw file for row-count reconciliation

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_a3E9gMBn1xSTTqOUdto15Q
