A modern VS Code extension for viewing and querying CSV/XLSX files with SQL capabilities.
Demo
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:
Loads and parses CSV/XLSX files
Renders data in an interactive table
Executes SQL queries
Provides real-time search and sorting
Tips
Large Files: For files with 10,000+ rows, use pagination and increase page size cautiously
SQL Performance: Query runs in-memory, so complex queries on large datasets may take time
Column Names: If column names have spaces, wrap them in backticks: `Column Name`
Export: The export function exports the current filtered/queried view, not the original file