1# Query tabular data | Codex use cases1---
2 2name: Query tabular data
3Codex use cases3tagline: Ask a question about a CSV, spreadsheet, export, or data folder.
4 4summary: Use ChatGPT with a CSV, spreadsheet, dashboard export, Google Sheet, or
55 local data file to answer a question, create a browser visualization, and save
6 6 the result.
77skills:
8 8 - token: $spreadsheet
9Codex use case9 description: Inspect tabular data, run calculations, and create charts or tables.
10 10 - token: google-sheets
11# Query tabular data11 url: /codex/plugins
12 12 description: Analyze approved Google Sheets when the data lives in a shared spreadsheet.
13Ask a question about a CSV, spreadsheet, export, or data folder.13bestFor:
14 14 - Questions that can be answered through a quick calculation, chart, table, or
15Difficulty **Easy**15 short summary.
16 16 - Roles that need to analyze data and create visualizations.
17Time horizon **30m**17starterPrompt:
18 18 title: Ask a Question
19Use Codex with a CSV, spreadsheet, dashboard export, Google Sheet, or local data file to answer a question, create a browser visualization, and save the result.19 body: |-
20 20 Analyze @sales-export.csv
21## Best for21
22 22 Question: Which customer segment changed the most last quarter?
23- Questions that can be answered through a quick calculation, chart, table, or short summary.23
24- Roles that need to analyze data and create visualizations.24 Please:
25 25 - inspect the columns before analyzing
26# Contents26 - answer the question from the data
27 27 - create a simple browser visualization as an HTML file
28[← All use cases](https://developers.openai.com/codex/use-cases)28 - start a local preview so I can open it in the built-in browser
29 29 suggestedEffort: low
30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/analyze-data-export/?export=pdf)30relatedLinks:
31 31 - label: File inputs
32Use Codex with a CSV, spreadsheet, dashboard export, Google Sheet, or local data file to answer a question, create a browser visualization, and save the result.32 url: /api/docs/guides/file-inputs
33 33 - label: Agent skills
34Easy34 url: /codex/build-skills
35 35---
3630m
37
38Related links
39
40[File inputs](https://developers.openai.com/api/docs/guides/file-inputs) [Agent skills](https://developers.openai.com/codex/skills)
41
42## Best for
43
44- Questions that can be answered through a quick calculation, chart, table, or short summary.
45- Roles that need to analyze data and create visualizations.
46
47## Skills & Plugins
48
49- Spreadsheet
50
51 Inspect tabular data, run calculations, and create charts or tables.
52- [Google Sheets](https://developers.openai.com/codex/plugins)
53
54 Analyze approved Google Sheets when the data lives in a shared spreadsheet.
55
56| Skill | Why use it |
57| --- | --- |
58| Spreadsheet | Inspect tabular data, run calculations, and create charts or tables. |
59| [Google Sheets](https://developers.openai.com/codex/plugins) | Analyze approved Google Sheets when the data lives in a shared spreadsheet. |
60
61## Starter prompt
62
63Analyze @sales-export.csv
64Question: Which customer segment changed the most last quarter?
65Please:
66- inspect the columns before analyzing
67- answer the question from the data
68- create a simple browser visualization as an HTML file
69- start a local preview so I can open it in the Codex browser
70
71Open in the Codex app
72
73Analyze @sales-export.csv
74Question: Which customer segment changed the most last quarter?
75Please:
76- inspect the columns before analyzing
77- answer the question from the data
78- create a simple browser visualization as an HTML file
79- start a local preview so I can open it in the Codex browser
80 36
81## Analyze the data37## Analyze the data
82 38
83Use Codex when you have a CSV, spreadsheet, dashboard export, Google Sheet, or local data file and want to answer a question from it. Start with the file and the question. Codex can inspect the columns, run the analysis, and create a browser visualization you can open in the Codex app.39Use ChatGPT when you have a CSV, spreadsheet, dashboard export, Google Sheet, or local data file and want to answer a question from it. Start with the file and the question. ChatGPT can inspect the columns, run the analysis, and create a browser visualization you can open in the ChatGPT desktop app.
84
85[
86Your browser does not support the video tag.
87](https://cdn.openai.com/codex/docs/developers-website/use-cases/data-analysis-fraud-spike.mp4)
88 40
891. Attach the file or mention the connected data source.411. Attach the file or mention the connected data source.
902. Ask the question you want answered.422. Ask the question you want answered.
913. Have Codex inspect the columns, run the calculation, and create an HTML visualization.433. Have ChatGPT inspect the columns, run the calculation, and create an HTML visualization.
924. Open the local preview in the Codex browser, then continue in the same thread to adjust the chart or slice the data another way.444. Open the local preview in the built-in browser, then continue in the same task to adjust the chart or slice the data another way.
93
94Use `@` to attach the CSV or mention the Google Sheet. If the data came from a dashboard, export the rows first so Codex can inspect the raw columns.
95
96## Follow-up analysis
97
98After Codex gives you the first answer, ask for the next comparison you would normally check.
99
100Use the same data and compare the result by [region, cohort, product, week, model version, or account type].
101Update the browser visualization for that comparison.
102
103You can keep going in the same thread: clean a column, exclude a test segment, compare two time windows, make the chart easier to read, or turn the result into a short note for a meeting.
104
105## Related use cases
106
107[
108 45
109### Turn feedback into actions
110 46
111Connect Codex to multiple data sources such as Slack, GitHub, Linear, or Google Drive to...
112 47
113Data Integrations](https://developers.openai.com/codex/use-cases/feedback-synthesis)[48Use `@` to attach the CSV or mention the Google Sheet. If the data came from a dashboard, export the rows first so ChatGPT can inspect the raw columns.
114 49
115### Clean and prepare messy data50## Follow-up analysis
116
117Drag in or mention a messy CSV or spreadsheet, describe the problems you see, and ask Codex...
118
119Data Knowledge Work](https://developers.openai.com/codex/use-cases/clean-messy-data)[
120
121### Forecast cash flow
122
123Give Codex cash-flow inputs and model constraints, then ask it to create an editable...
124 51
125Data Knowledge Work](https://developers.openai.com/codex/use-cases/cash-flow-forecast)52After ChatGPT gives you the first answer, ask for the next comparison you would normally check.
126 53
54You can keep going in the same task: clean a column, exclude a test segment, compare two time windows, make the chart easier to read, or turn the result into a short note for a meeting.