CSV Import Errors: Fix Trade Import Failures
CSV import is the most reliable way to backfill a trading journal when broker APIs are down, history windows are short, or you trade on a platform without live sync. When TradeLyser shows format errors, zero rows imported, or partial imports, the cause is usually broker template mismatch, edited files, or date encoding—not a broken account.
This guide helps Indian traders fix CSV import errors for Zerodha, Fyers, Angel One, Upstox, Dhan, Groww, and generic exports—aligned with import CSV and the CSV template.
Before you import: set expectations
TradeLyser maps broker-specific column names to a standard trade model. The importer expects:
- Executed trades with entry/exit (or single-leg day trades per broker format)
- Recognizable symbol, quantity, price, and datetime columns
- Consistent date format within the file
It will skip duplicates that match trades already in your journal—an import that “does nothing” may still be successful deduplication.
Quick pre-import checklist
| Item | Recommendation |
|---|---|
| Broker selected in import dialog | Exact broker, not “closest” guess |
| File source | Direct export from broker; avoid Excel “Save As” that drops columns |
| Editing | Do not delete columns or rename headers |
| Dates | DD/MM/YYYY or YYYY-MM-DD consistently |
| Size | Under 10 MB per file |
| Duplicates | Expect skips if you already synced the same fills |
Common import issues and fixes
1. Format not recognized
Symptoms: “Unsupported format,” zero trades parsed, or garbage preview rows.
Causes: Wrong broker selected; CSV saved from a PDF copy; semicolon vs comma delimiter changed; merged cells from Excel.
Fix:
- Re-export from the broker’s Trade history / P&L / Tax P&L report as CSV (not PDF).
- In TradeLyser, open Import Trades and select the exact broker (import CSV steps).
- If your broker is unsupported, try Generic CSV only when you align columns to the CSV template.
- Open the file in a text editor—headers should be one row, comma- or tab-separated, not prose.
2. Missing required columns
Symptoms: Error listing missing Symbol, Date, Price, Quantity, or Side.
Causes: Exporting a summary report instead of trade-wise ledger; removing columns to shrink file; broker update changing header names.
Fix:
- Export the detailed trade report with all default columns.
- Compare the first row to the template for your broker in CSV template.
- Re-export including fees/taxes columns even if optional—they help P&L accuracy.
- Do not transpose or pivot the sheet before upload.
Typically required:
- Symbol / Scrip name
- Trade date and time (or separate date + time columns)
- Buy/Sell or transaction type
- Quantity
- Price or rate
- Entry/exit fields per broker layout
3. Date and time format errors
Symptoms: Rows rejected; dates shifted by one day; import succeeds but trades appear on wrong session.
Causes: US-style MM/DD/YYYY mixed with DD/MM/YYYY; Excel auto-converting dates to serial numbers; missing timezone on overnight sessions.
Fix:
- Prefer DD/MM/YYYY for Indian brokers or ISO YYYY-MM-DD throughout the file.
- If Excel reformats dates, export CSV again from the broker portal without opening in Excel, or set column format to Text before save.
- Set TradeLyser timezone to IST under trade settings.
- For overnight F&O, verify the broker attributes the trade to the correct session date.
4. Duplicate trades skipped
Symptoms: “0 new trades imported”; message about duplicates.
Causes: You already synced or imported the same fills; overlapping CSV ranges.
Fix:
- Search Trades for the symbol and date—data may already exist.
- Narrow CSV to only the missing date range.
- If a trade exists but is wrong, edit trade instead of forcing duplicate import.
- See Missing Trades if filters hide existing rows.
5. File too large or too many rows
Symptoms: Upload fails; timeout; partial import.
Causes: Multi-year export exceeding limits; embedded charts in XLSX bloating size.
Fix:
- Split exports by financial year or quarter.
- Stay under 10 MB and 10,000 trades per import batch (import limits).
- Remove blank trailing rows in Excel before save.
- Import chronologically (oldest chunk first) for easier verification.
6. Wrong broker template (mixed brokers)
Symptoms: Absurd prices; symbols as numbers; all rows rejected.
Causes: Selecting Zerodha while uploading Angel One file; combining two brokers in one sheet.
Fix:
- One broker per file.
- Match dropdown to export source.
- For portfolio migrations, import each broker into a separate account label in TradeLyser.
7. Special characters and symbol names
Symptoms: Options symbols break; indices show incorrectly.
Causes: UTF-8 BOM issues; & in symbol names; stripped leading zeros.
Fix:
- Save CSV as UTF-8 from broker portal.
- Avoid manual find-replace on symbol column.
- For NFO symbols, keep full contract name as broker provides.
8. Partial import (some rows failed)
Symptoms: Import summary shows imported + failed counts.
Fix:
- Open the import log / summary and note the first failing row number.
- Fix that row’s date, quantity, or side in the source export and re-import only the failed range.
- Cross-check sync history if you mixed sync and CSV for the same day.
Step-by-step clean import
- Export fresh CSV from broker (full columns).
- Settings → Accounts → Import Trades (or Trades → Import).
- Select broker → upload → review preview.
- Confirm row count looks reasonable vs broker trade count.
- Import → verify on Trades with All time filter.
- Reconcile P&L sample day against broker (incorrect P&L).
Broker export tips (India)
| Broker | Export path (typical) |
|---|---|
| Zerodha | Console → Reports → Tradebook / Tax P&L → Download |
| Fyers | My Account → Reports → Tradebook |
| Angel One | Reports section → trade-wise export |
| Upstox | Reports → Trade history |
| Dhan / Groww | Use in-app history export; CSV for gaps if API sync is limited |
Broker-specific import articles: Zerodha history, Dhan, Groww.
After a successful import
- Tag trades for strategy review
- Generate reports once data is complete
- Enable broker sync for ongoing updates to avoid double manual work
Sending a file to support
If errors persist, email support@tradelyser.com with:
- Broker name and export type (tradebook vs tax report)
- First 5 lines of the CSV (mask account IDs) or a 10-row sample file
- Screenshot of the error and preview grid
- TradeLyser account email
Do not send full multi-year files with personal identifiers unless support requests them through a secure channel.
Frequently asked questions
Should I edit the CSV to fix errors?
Avoid editing structure; fix the export or broker selection. Only correct obvious single-row typos after backup.
Can I import Excel XLSX?
Yes, when supported—prefer native CSV from broker to reduce Excel date corruption.
Why does preview show fewer rows than my file?
Blank rows, header repeats, and invalid lines are skipped. Check for footer summary rows in the export.
Will CSV overwrite synced trades?
Existing matches are skipped or updated per duplicate rules—not blindly overwritten.
Can I import options and futures?
Yes if the broker export includes those segments and you select the correct account type.
Generic CSV vs broker-specific?
Broker-specific mapping is more accurate. Generic is a fallback when you manually match the template.
Import worked but dashboard P&L looks wrong?
See Incorrect P&L—often fees or calculation method.
Excel and Google Sheets pitfalls
Many import failures start in desktop tools, not TradeLyser:
- Scientific notation on symbols (e.g.
1.23E+15) — set symbol column to Text before any edit. - Leading zeros stripped on contract codes — export CSV directly from broker instead of copy-paste from Sheets.
- Locale decimal comma — Indian exports usually use dot decimals; if your Excel uses comma decimals, re-export from broker in English/IN locale.
- Extra summary rows at bottom (“Total”, “Grand Total”) — delete only those rows in a copy, never the header row.
- Multiple sheets — export the trade sheet only; XLSX with wrong active sheet imports empty.
When possible, upload the original broker download without opening it in Excel first.
Validating import success without guessing
After import:
- Note imported / skipped / failed counts in the summary dialog.
- On Trades, sort by newest and confirm the latest session date.
- Compare trade count for one day against broker trade book line count (fills, not orders).
- Open Sync History if you combined sync + CSV the same day—duplicate skips are normal.
If counts match but analytics look empty, reset dashboard date filters (dashboard not loading covers UI scope issues).