CSV to diagram: the same columns draw a flowchart, swimlane or hierarchy
Shape, Box text and Line to are the three columns that draw a diagram. Add the lane columns and the same rows become a swimlane; change the rows and they become a process map, a hierarchy, a decision tree or a journey map.
The CSV that produces this diagram
One row per step. The numbers in Line to are row numbers — that is what draws the connectors, and it is the column most files are missing.
| # | Shape | Box text | Line to | Line text | Horizontal lane | Vertical lane |
|---|---|---|---|---|---|---|
| 1 | Start | Land on the site from a campaign or search | 2 | Awareness | Customer | |
| 2 | Process | Record the source, campaign and landing page | 3 | Awareness | Marketing | |
| 3 | Decision | Does the visitor start a trial? | 5, 4 | Starts a trial, Leaves without signing up | Awareness | Customer |
| 4 | End | Left before the trial started | Awareness | Marketing | ||
| 5 | Process | Create the trial account and verify the email | 6 | Trial | Customer | |
| 6 | Registry | Open a CRM record with the trial end date | 7 | Trial | Sales | |
| 7 | Decision | Does the account fit the target profile? | 9, 8 | Fits the profile, Out of scope | Trial | Sales |
| 8 | End | Disqualified as out of scope | Trial | Sales | ||
| 9 | Process | Run the guided setup in the product | 10 | Trial | Product | |
| 10 | Decision | Is the first key action done within 7 days? | 13, 11, 12 | Key action done, Not done by day 7, Nothing by day 14 | Trial | Product |
| 11 | Process | Send the day-7 setup reminder with a booking link | 9 | Trial | Marketing | |
| 12 | Reject | Churned before activation | Trial | Marketing | ||
| 13 | Process | Record the activation event with its timestamp | 14 | Activation | Product | |
| 14 | Decision | Are three or more seats active in the first week? | 16, 15 | Three or more seats, Fewer than three | Activation | Customer |
| 15 | Process | Book a use-case review with the wider team | 16 | Activation | Support | |
| 16 | Process | Send the pricing options and the trial end date | 17 | Conversion | Sales | |
| 17 | Decision | Does the trial convert before it expires? | 20, 18 | Buys a plan, Expires unpaid | Conversion | Customer |
| 18 | Decision | Was an extension asked for before the end date? | 16, 19 | Extension agreed, No extension | Conversion | Sales |
| 19 | Reject | Trial expired without a purchase | Conversion | Sales | ||
| 20 | Process | Take payment and open the paid account | 21 | Conversion | Customer | |
| 21 | Process | Compare day-30 usage with the activation baseline | 22 | Retention | Product | |
| 22 | Decision | Is usage still above the activation baseline? | 25, 23, 24 | Above the baseline, Below on any measure, No sessions for 30 days | Retention | Product |
| 23 | Process | Run a recovery call and agree one action | 25 | Retention | Support | |
| 24 | Reject | Cancelled at renewal | Retention | Support | ||
| 25 | Process | Confirm the renewal and record any expansion | 26 | Retention | Sales | |
| 26 | Success | Renewed and expanded | Retention | Customer |
#,Shape,Box text,Line to,Line text,Horizontal lane,Vertical lane
1,Start,Land on the site from a campaign or search,2,,Awareness,Customer
2,Process,"Record the source, campaign and landing page",3,,Awareness,Marketing
3,Decision,Does the visitor start a trial?,"5, 4","Starts a trial, Leaves without signing up",Awareness,Customer
4,End,Left before the trial started,,,Awareness,Marketing
5,Process,Create the trial account and verify the email,6,,Trial,Customer
6,Registry,Open a CRM record with the trial end date,7,,Trial,Sales
7,Decision,Does the account fit the target profile?,"9, 8","Fits the profile, Out of scope",Trial,Sales
8,End,Disqualified as out of scope,,,Trial,Sales
9,Process,Run the guided setup in the product,10,,Trial,Product
10,Decision,Is the first key action done within 7 days?,"13, 11, 12","Key action done, Not done by day 7, Nothing by day 14",Trial,Product
11,Process,Send the day-7 setup reminder with a booking link,9,,Trial,Marketing
12,Reject,Churned before activation,,,Trial,Marketing
13,Process,Record the activation event with its timestamp,14,,Activation,Product
14,Decision,Are three or more seats active in the first week?,"16, 15","Three or more seats, Fewer than three",Activation,Customer
15,Process,Book a use-case review with the wider team,16,,Activation,Support
16,Process,Send the pricing options and the trial end date,17,,Conversion,Sales
17,Decision,Does the trial convert before it expires?,"20, 18","Buys a plan, Expires unpaid",Conversion,Customer
18,Decision,Was an extension asked for before the end date?,"16, 19","Extension agreed, No extension",Conversion,Sales
19,Reject,Trial expired without a purchase,,,Conversion,Sales
20,Process,Take payment and open the paid account,21,,Conversion,Customer
21,Process,Compare day-30 usage with the activation baseline,22,,Retention,Product
22,Decision,Is usage still above the activation baseline?,"25, 23, 24","Above the baseline, Below on any measure, No sessions for 30 days",Retention,Product
23,Process,Run a recovery call and agree one action,25,,Retention,Support
24,Reject,Cancelled at renewal,,,Retention,Support
25,Process,Confirm the renewal and record any expansion,26,,Retention,Sales
26,Success,Renewed and expanded,,,Retention,CustomerThe diagram those rows produce
Rendered from the rows above, unchanged. Edit a cell and the diagram follows; move a box and the rows follow.
The columns QueryChart reads
Header names are matched, not column positions — extra columns are carried along and ignored by the diagram.
| Column | Required? | What it does | Example |
|---|---|---|---|
# | Optional | The row's 1-based position, and the number every Line to value points at. | 3 |
Shape | Required | Which box is drawn: Start, Process, Decision, End, Success or Reject. | Decision |
Box text | Required | The words printed inside the box on the diagram. | Does the visitor start a trial? |
Line to | Required | The row number or numbers this row draws an arrow to, comma-separated for a branch. | 5, 4 |
Line text | Optional | The label on each arrow, in the same order as the numbers in Line to. | Starts a trial, Leaves without signing up |
Horizontal lane | Optional | The stage band the row sits in, which is what turns a flat chart into a staged one. | Awareness |
Vertical lane | Optional | The owner band the row sits in, which is what makes the diagram a swimlane. | Customer |
How it works
Write one step per row
Each row is one box. Shape says which box it is (Start, Process, Decision, End, Success, Reject) and Box text is the words printed inside it. A file with only those two columns already renders, as a set of boxes with nothing joining them yet.
Point Line to at row numbers
Line to holds the 1-based position of the row you are connecting to, comma-separated when the row branches: 5, 4. Line text holds the labels in matching order, so Starts a trial belongs to 5 and Leaves without signing up belongs to 4. /guides/how-to-define-flowchart-connections-in-csv works through the pairing.
Let the rows decide what kind of diagram you get
There is no diagram-type setting. Rows that fan out of a Decision and never rejoin give a decision tree (/templates/csv-decision-tree). Rows carrying a Vertical lane per owner give a swimlane (/templates/csv-swimlane-flowchart). A row whose Line to names several children, none of which loop back, gives a hierarchy (/templates/csv-parent-child-hierarchy, /templates/csv-organizational-chart). The same vocabulary also covers /templates/csv-to-flowchart, /templates/csv-process-map, /templates/csv-approval-workflow and /templates/csv-customer-journey-map.
Drop the file onto the spreadsheet
Open the editor's spreadsheet view and drop the .csv onto it, or paste the CSV text straight in. Columns are matched by header name rather than by position, so the order your export happens to use does not matter, and headers QueryChart does not recognise are carried along and ignored. There is no wizard and no mapping screen. /guides/how-to-import-csv-into-a-flowchart-tool covers what to check on a first import.
Correct it in whichever surface is faster
The spreadsheet and the canvas are the same document. Retype a Line to cell to move an arrow, or drag a box and read the changed number back in the sheet. Eight worked files sit at /templates/csv if you would rather start from one than from a blank sheet.
What usually goes wrong
- Line to carries an ID instead of a row number — The value is the row's 1-based position, the number in the # column. Exports that carry their own step keys (STEP-04, a1, an order number) have to be translated to positions first. A Line to naming something that is not a row is dropped, and you get a box with no arrow leaving it rather than an error.
- Line text is out of order with Line to — The two lists pair by position. Line to 5, 4 with Line text Leaves without signing up, Starts a trial labels both branches backwards: the diagram looks correct and says the opposite of what you meant. Read the pairs left to right before importing.
- The header row was renamed on the way out — Matching is on the header name: Shape, Box text, Line to, Line text, Horizontal lane, Vertical lane. A column titled Step or Next Step falls out of the contract and is carried as an ignored extra, so the file imports cleanly and the boxes come out empty. Rename the header, not the data.
- A Decision with one way out — A diamond leaving by a single unlabelled arrow is a Process wearing the wrong shape. Give every Decision at least two entries in Line to and a label for each in Line text (Fits the profile, Out of scope) or set Shape to Process and keep the single arrow.
- Lane columns filled in on some rows only — A blank Horizontal lane or Vertical lane puts that row outside every band, sitting next to rows that have one, which reads as a step nobody owns. If you are using lanes, fill the column on every row; if you are not, leave it out of the file rather than half-filling it.
Frequently asked questions
What does my CSV actually need to contain?
Three columns. Shape picks the box, Box text is what it says, and Line to is the row number the arrow goes to. Line text, Horizontal lane and Vertical lane are refinements to a diagram that is already drawing: you can add them on the second pass.
How do I get a swimlane instead of a plain flowchart?
Add the lane columns to the file you already have. Vertical lane is who owns the step (Customer, Marketing, Product, Sales, Support in the sample) and Horizontal lane is the stage it belongs to, Awareness through Retention. Same rows, same connections, banded layout. /templates/csv-swimlane-flowchart shows it on its own.
How many kinds of diagram can one column vocabulary produce?
A flowchart, a process map, a swimlane, an approval workflow, a decision tree, a parent-child hierarchy, an org chart and a customer journey map: eight worked files at /templates/csv. What separates them is which rows you wrote, not a template you picked or a setting you changed.
Is there an import wizard or a column mapper?
No. You drop the .csv onto the editor's spreadsheet area or paste the rows into it, and the columns are matched by header name. There is no mapping screen to work through and nothing to configure per file.
My export has twenty columns I do not need. Do I have to strip them out?
No. Headers QueryChart does not recognise are carried through and ignored, so an ERP, CRM or ticketing export can go in as it came out. Deleting the extra columns makes the file easier for you to read; it changes nothing about the diagram.
Does an AI model read the file and decide what to draw?
No. Each cell is parsed, not interpreted, so the same file produces the same diagram every time: today, on a colleague's machine, and a year from now when someone re-imports it for an audit. No step is invented and nothing quietly moves between runs.
How does this compare with Visio's Data Visualizer?
Data Visualizer builds a Visio drawing from a formatted Excel table, and its desktop templates remain available under Visio Plan 2; Microsoft announced in November 2025 that the Excel add-in version is being retired. QueryChart reads a plain CSV in the browser, with no Visio licence and no add-in to install. /guides/csv-vs-excel-for-flowcharts compares the two source formats.
Can I get a spreadsheet back after editing the diagram?
Yes. The sheet and the canvas are one document, so a box you move on the canvas shows up as a changed cell, and the rows you copy out match what is on screen. If your source of truth is Excel or Google Sheets rather than a .csv, /excel-to-flowchart and /google-sheets-to-flowchart take the same columns.