[MODEL] Claude repeatedly uses openpyxl for Excel charts despite it being fundamentally broken for time-series
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude made incorrect assumptions about my project
What You Asked Claude to Do
I asked Claude to create Excel line charts showing time-series data (RS485
inverter monitoring:
frequency, current, voltage, power vs wall-clock time HH:MM:SS).
What Claude Actually Did
Claude repeatedly attempted to use openpyxl LineChart with set_categories().
This always generates <c:numRef> in the XML instead of <c:strRef>, causing Excel
to treat each timestamp as a separate data series — producing 80+ colored lines
per chart instead of a single trend line.
Claude tried 6+ different openpyxl-based fixes over 6 hours, none of which
worked,
because the bug is fundamental to openpyxl's chart XML generation and cannot be
patched from user code.
The correct solution (xlsxwriter library) was only found after extensive trial
and error.
Claude should have known openpyxl LineChart is broken for string/time categories
and
recommended xlsxwriter immediately.
Expected Behavior
Claude should immediately recognize that openpyxl LineChart is broken for
string/time-based X-axis categories, and recommend xlsxwriter instead without
requiring the user to discover this through hours of failed attempts.
✻ Cogitated for 4s
Files Affected
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
_No response_
Claude Model
Sonnet
Relevant Conversation
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.1.179 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_