Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>XLS PreviewNew to Visual Studio Code? Get it now.
XLS Preview

XLS Preview

Phuong Tran

|
4 installs
| (0) | Free
Preview .xls and .xlsx files directly in VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

XLS Preview — VS Code Extension

Preview .xls and .xlsx spreadsheet files directly inside VS Code using a rich, interactive table viewer.


Features

Feature Details
📊 Multi-sheet support Navigate between sheets via tabs at the top
🔍 In-sheet search Ctrl+F to search; Enter / Shift+Enter to cycle matches
📋 Copy cell / row Right-click any cell to copy its value or the whole row as TSV
💾 Export CSV Export the current sheet as CSV
🎨 VS Code theme aware Automatically adapts to your light/dark theme
🔢 Row & column headers Excel-style column letters (A, B, … Z, AA, …) and row numbers
⚡ Large file handling Configurable row limit with a truncation notice
📅 Date parsing Dates are rendered in human-readable ISO format

Usage

  1. Open the Run & Debug panel (Ctrl+Shift+D)
  2. Select "Run Extension (no build)" from the dropdown
  3. Click the green ▶ play button -> A new vscode window open.
  4. Open any .xls or .xlsx file in VS Code — the preview opens automatically.
  5. Right-click a .xls/.xlsx file in the Explorer and choose Open XLS Preview.
  6. Use Ctrl+F inside the preview to search for text.

Extension Settings

Setting Default Description
xlsPreview.maxRows 1000 Maximum rows displayed per sheet
xlsPreview.theme "auto" Color theme: auto, light, or dark
xlsPreview.frozenHeaders true Freeze the header row while scrolling

Development

# Install dependencies
cd xls-preview
npm install

# Compile TypeScript
npm run compile

# Watch mode
npm run watch

# Package as .vsix
npm run package

Press F5 in VS Code (with the xls-preview folder open) to launch the Extension Development Host.


How It Works

.xls / .xlsx file
      │
      ▼
 XlsParser (xlsx library)
      │  parses sheets, rows, cells
      ▼
 XlsEditorProvider
      │  serialises data to JSON
      ▼
 Webview HTML + JS
      │  renders interactive table
      ▼
    User
  • src/extension.ts — activates the extension and registers the command.
  • src/xlsEditorProvider.ts — implements CustomReadonlyEditorProvider; builds the webview HTML.
  • src/xlsParser.ts — wraps the xlsx library to extract typed cell data.
  • src/utils.ts — CSP nonce helper.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft