---
title: "Export a CSV and make a first chart in Vista | Oplema"
description: "Learn to export a weekly summary to CSV with Output in Strata, publish the same table to Vista with Vista Source and check the chart against the file."
url: "https://oplema.com/learn/export-to-report/export-and-chart"
updated: "2026-11-12"
---

Lesson 9 of 10 · Lab

# Export results to CSV and make a first chart

Output writes a table to a file. Vista Source publishes a table to Vista, Oplema's browser app for dashboards, where dashboards are built. Give both the same table, and the file and the chart can't disagree.

A flow's result stays in the flow until you send it somewhere. Marit wants a file for the accountant and one picture for herself.

This live flow in [Strata](https://oplema.com/strata), Oplema's browser app for data prep, holds the week's 93 Harbour hires at [fictional Kramerica Bikes](https://oplema.com/learn/export-to-report/first-data-flow), your Formula and the summary by bike code from the last lesson. It runs in your browser, so Output downloads the file rather than saving it to a folder.

Output and Vista Source both need Summarize's table. Do you need a second Summarize?

No. One output can feed both blocks, as it fed Count Dataset in the last lesson, so the file and the chart come from the same four rows.

## Download the file and publish the table

1. **Summarize** opens first, with the week's four rows by bike code.
2. In the palette, select **IO** and drag **Output** to the right of **Summarize**. It wires itself to Summarize.
3. If Output is set to Local folder, this page can't save to it. Select **Output** and change **Local folder** to **Download**.
4. If **Output** shows 93 rows, it's wired to **Formula**: delete that wire and drag from **Summarize**'s right dot to Output's left dot.
5. Select **Output**, select the **Filename** field, select all (Ctrl+A or Cmd+A) and type `harbour-week`.
6. Select **Run local**. Your browser downloads the file. If nothing downloads, **Output** has no wire: drag from **Summarize**'s right dot to Output's left dot.
7. Publish the same table to [Vista](https://oplema.com/vista): drag **Vista Source** from **IO** below **Output** and wire **Summarize** to it.
8. Select **Vista Source**, select the **Display name** field, select all (Ctrl+A or Cmd+A) and type `harbour_week`.

In an expression, press Esc to apply it and move on (press it twice if a suggestion list is open).

What the file should hold

Four rows, one per bike code, with `hires`, `bikes`, `gross` and `net`: the same as Summarize's preview. Open it in a text editor rather than a spreadsheet, so nothing reformats the amounts. The file holds dated hires only, so report the 3 undated hires, worth €93.00 gross, beside it.

## The chart and the file agree

Here the week's net by bike code is already charted in Vista, as your `harbour_week` table would be. The bars add up to €3,274.80, the figure above them, and the tallest is CTY, labeled €1,976: bar labels drop trailing zeros.

Check a chart the way you check a table: against a figure you've proven. The CTY bar should match CTY's `net` in your downloaded file, 1976.00. A chart drawn from another table, or from a filtered one, looks just as convincing.

See the [Output](https://oplema.com/docs/strata/io/output) and [Vista Source references](https://oplema.com/docs/strata/io/vista-source). For later: [How to choose the right chart](https://oplema.com/learn/business-intelligence/chart-choice) explains why bars suit this one.

## Common export mistakes

- **Opening the CSV in a spreadsheet and saving it.** Saving can rewrite amounts and dates to your computer's settings. Send the file as the flow wrote it.
- **Charting from a different table.** Then the chart and the file can disagree. Branch both from one block.
- **Charting gross when the report says net.** Check which column the chart adds up. Its total should match the file's.

## COPY and Save As in SQL and Excel

```
COPY  ( SELECT  bike_code,  count ( * )  AS  hires,  sum (net_eur)  AS  net
      FROM  week  GROUP BY  bike_code)
TO  'harbour-week.csv'  (HEADER);
```

DuckDB's `COPY ... TO` writes a query's result to a file, as Output does. In Excel, **File > Save As > CSV** writes the sheet with your computer's separators, which is how a European laptop ends up writing semicolons.
