Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>csv-sqlNew to Visual Studio Code? Get it now.
csv-sql

csv-sql

mohanchinnappan

|
1 install
| (0) | Free
View and query CSV/XLSX files with SQL
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CSV/XLSX SQL Viewer Extension

A modern VS Code extension for viewing and querying CSV/XLSX files with SQL capabilities.

CSV SQL Banner License


Demo

  • demo1

Features

  • 📊 Beautiful Table View: View CSV/XLSX files in a clean, dark-themed table interface
  • 🔍 Full-text Search: Search across all columns in real-time
  • 📑 Column Sorting: Click column headers to sort data ascending/descending
  • 📄 Pagination: Handle large files with configurable page sizes (25/50/100/500 rows)
  • 💾 Export CSV: Export filtered/queried results back to CSV
  • 🗄️ SQL Queries: Run SQL queries on your data using standard SQL syntax
  • ✨ Auto-complete: Column name auto-completion in the SQL editor
  • 🌙 Dark Theme: Beautiful dark theme matching VS Code's aesthetic

Usage

Opening Files

  • From Explorer: Right-click a CSV/XLSX file → "Open CSV/XLSX with SQL Viewer"
  • From Command Palette: Ctrl+Shift+P → "Open CSV/XLSX with SQL Viewer"

Using the SQL Editor

-- Select all data
SELECT * FROM data

-- Filter rows
SELECT * FROM data WHERE column_name = 'value'

-- Aggregate functions
SELECT column_name, COUNT(*) as count 
FROM data 
GROUP BY column_name

-- Sort results
SELECT * FROM data ORDER BY column_name DESC

-- Multiple conditions
SELECT * FROM data 
WHERE age > 25 AND city = 'New York'

-- Pattern matching
SELECT * FROM data 
WHERE name LIKE '%John%'

-- Limit results
SELECT * FROM data LIMIT 10

Auto-complete

Start typing a column name in the SQL editor, and matching columns will appear in a dropdown. Click or press Enter to insert.

Table Features

  • Search: Use the search box to filter visible rows
  • Sort: Click column headers to sort (click again to reverse)
  • Pagination: Navigate pages or change page size
  • Export: Export current view (filtered/queried data) to CSV

Reset Data

Click "Reset to Original Data" to restore the original file data after running queries.

Supported File Types

  • .csv - Comma-separated values
  • .xlsx - Excel 2007+ format
  • .xls - Legacy Excel format

Technical Details

Architecture

The extension creates a Webview panel that:

  1. Loads and parses CSV/XLSX files
  2. Renders data in an interactive table
  3. Executes SQL queries
  4. Provides real-time search and sorting

Tips

  1. Large Files: For files with 10,000+ rows, use pagination and increase page size cautiously
  2. SQL Performance: Query runs in-memory, so complex queries on large datasets may take time
  3. Column Names: If column names have spaces, wrap them in backticks: `Column Name`
  4. Export: The export function exports the current filtered/queried view, not the original file

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft