Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Workbook Lens - Excel & Data ViewerNew to Visual Studio Code? Get it now.
Workbook Lens - Excel & Data Viewer

Workbook Lens - Excel & Data Viewer

Ali Khawaja

|
1 install
| (0) | Free
Explore Excel workbooks with formatting, frozen panes, sorting, filtering, and selection statistics. Local and read-only.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Workbook Lens - Excel & Data Viewer

A local, offline, read-only .xlsx viewer for Visual Studio Code. No Office installation, account, network service, or workbook upload is required.

Workbook Lens showing a formatted worksheet in a dark theme

Inspect workbooks without leaving your editor: resize columns, freeze headings, search, sort and filter rows, jump to source addresses, and inspect selection statistics. Excel .xlsx is supported today; CSV and other formats are planned.

Install

Use Extensions: Install from VSIX... in VS Code and select workbook-lens-0.2.1.vsix. Do not double-click it in Windows Explorer: Windows may send it to the unrelated Visual Studio installer.

Open an .xlsx file, or run Workbook Lens: Open Workbook. If another extension handles it, right-click the editor tab and select Reopen Editor With... > Workbook Lens. After an update, use Developer: Reload Window.

The extension ID is alikhawaja.workbook-lens. This replaces the development extension techdemos.local-excel-viewer; remove that older extension if installed to avoid two viewers competing for .xlsx files. The current release supports Excel .xlsx files only; CSV and other formats are planned, not yet available.

Navigate and select

  • Switch worksheets with the bottom tabs. Hidden sheets are included and labeled; worksheet hiding is not a confidentiality boundary.
  • Click a cell to inspect its original Excel address, formatted value and formula.
  • Use arrows, Tab, Enter, Page Up/Down, Home/End and Ctrl/Cmd+Home/End.
  • Shift+click, drag, or Shift+arrow to select a rectangular range.
  • Use Copy selection or Ctrl/Cmd+C to copy tab-separated formatted values. Tabs, quotes and newlines inside values are quoted.
  • Search the current view with Find next, or Ctrl/Cmd+F from the grid. Search includes values and formulas, wraps, and excludes filtered-out rows.
  • Enter a source cell/range such as D250, $B$2 or A1:F100 and click Go. Ctrl/Cmd+G from the grid focuses this input. Addresses remain original Excel addresses after sorting. Filtered-out rows or source ranges that are no longer contiguous produce an explicit error; clear the view to select them.
  • The status bar shows selection count (nonempty saved values), sum and average. Numeric cached formula results are included. Dates, booleans, text, errors and missing results are excluded from sum/average. No numeric values means no average.

Formatting and column sizing

The viewer imports workbook column widths, font family/size, bold/italic, underline/strike, font colors, solid fills, basic horizontal/vertical alignment, and number/date formats. Direct RGB and workbook theme colors are supported; theme tints and character-based column widths are approximate. Default dark-theme workbook text on unfilled cells follows VS Code's foreground color so it remains readable in both light and dark themes; explicit font colors and solid fills retain their workbook colors.

Drag a column header's right edge to resize it (48-1,200 pixels). Double-click that edge to fit currently loaded visible values, not the entire worksheet. Keyboard users can focus a resize handle and use Left/Right arrows (Shift for larger steps) or Enter to fit. Manual widths take precedence over workbook widths.

Freeze panes

Workbook panes imports saved frozen rows/columns. You can instead choose None, Top row, First column, Top row + first column, or Before selected cell (freeze everything above/to the left of the active view cell). Frozen data remains visible while both axes scroll. Large frozen areas are limited to leave space for scrollable data; the control's tooltip shows actual counts and whether the viewport limited them.

Sort and filter

Enter a column letter (for example B), choose Ascending/Descending, and/or enter a case-insensitive Contains filter, then click Apply.

  • One sort column and one contains filter on that same column are supported.
  • First row is header keeps the first row in place and out of filtering.
  • Numbers/dates sort by value; text uses natural, case-insensitive collation. Empty/missing values sort last in both directions. Ties retain source order.
  • Original row labels, addresses and formulas remain unchanged.
  • Copy, search, go-to, selection statistics and frozen panes use the resulting view.
  • Clear restores original row order and removes filtering.
  • Sorting/filtering never changes or saves the source workbook.

Widths, freeze choices and sort/filter settings are remembered per worksheet in VS Code's editor state. The active sheet, cell and viewport survive reloads where possible. External workbook changes automatically reload the file.

Open in desktop Excel

Open in Excel, also available as Workbook Lens: Open in Desktop Excel, hands the current local workbook to installed Microsoft Excel on Windows. It does not embed Excel, automate it, save the file, or run it in the background. Excel's normal security prompts and settings apply after the handoff.

The action is disabled for remote workspaces and non-Windows environments. If Excel is unavailable or its registered executable cannot be launched, the viewer reports an error. This feature is optional: everything else works without Office. The viewer itself never executes macros or refreshes external connections.

Compatibility and limits

Supports .xlsx data viewing and cached formula results, which may be stale. Formulas are never recalculated; missing saved results are labeled.

Charts, drawings, merged-cell layout, conditional formatting, rich-text runs, indexed colors, wrapped/rotated text, row heights, hidden-row/column suppression, pivot interactions and editing are not implemented. Merged-cell content appears only at its original top-left cell. Unsupported number formats are labeled. Legacy .xls, .xlsb, .xlsm, encrypted workbooks and browser-only VS Code are outside scope; decrypt encrypted files in Excel first.

Files are limited to 50 MiB, 2,000,000 populated cells and 10,000 worksheets. Parsing runs in a worker with a 512 MiB JavaScript heap limit and a 30-second startup deadline. These are guardrails, not a guarantee of support for every file below them: compressed workbooks can expand substantially. Rendering is virtualized in both dimensions, including frozen panes, but parsing loads the workbook into memory. Sort/filter operates on the full used row range. Copy and statistics are limited to 100,000 selected cells; copied text to 10 MiB.

Files are read through VS Code's filesystem API; parsing runs on the workspace extension host, including supported SSH/WSL/Dev Container hosts. Clipboard writes use VS Code's clipboard API. Remote hosts need no Office installation.

Development

Requires Node.js 20+ and npm.

npm install
npm run check
npm test
npm run test:ui
npm run package

npm test builds the extension and exercises the workbook model/worker. The UI smoke test uses installed Microsoft Edge through Playwright in headless mode and a real workbook worker, without installing a browser or touching the user's browser profile. It mocks the desktop handoff rather than launching Excel. It also generates samples/example.xlsx and dist/viewer-preview.png.

Open this folder in VS Code and press F5 for an Extension Development Host. The bundled extension needs no runtime npm installation.

Marketplace identity

  • Product: Workbook Lens - Excel & Data Viewer
  • Publisher ID: alikhawaja
  • Publisher display name: Ali Khawaja (set in Marketplace publisher management)
  • Extension/package name: workbook-lens
  • Full extension ID: alikhawaja.workbook-lens

Source and issue tracking: https://github.com/alikhawaja/workbook-lens. For publishing, sign in to the alikhawaja publisher at https://marketplace.visualstudio.com/manage. Public upload is a separate action. The Marketplace signs published extensions; locally packaged VSIX files are development/sideload packages, not Marketplace-signed releases.

Architecture

  • src/extension.ts: custom editor, filesystem watcher, worker lifecycle, revision tracking, clipboard access, desktop handoff and message routing.
  • src/worker.ts: isolated parser and workbook request handler.
  • src/model.ts: ExcelJS adapter, SSF formatting, range reads, stable row views, search, source navigation, statistics and TSV generation.
  • src/styles.ts: safe formatting metadata and workbook theme colors.
  • src/desktop.ts: Windows Excel discovery and direct executable launch.
  • src/protocol.ts: shared contracts and runtime request validation.
  • src/webview.ts: TypeScript UI with virtualized body/frozen regions.
  • media/viewer.css: theme-aware styling and interaction affordances.

The worker owns the workbook; the extension brokers requests; the webview owns selection, layout and view preferences. Reload revisions discard outdated responses, and view epochs prevent stale sheet/search responses from being applied. Workbook strings use textContent and input values, never HTML. Formatting is applied through individual DOM style properties, not workbook-provided CSS. Local assets load under a restrictive content security policy. Hyperlinks are plain text. The workbook is never written by the viewer.

MIT licensed. Runtime dependency notices are in THIRD_PARTY_NOTICES.txt and the generated dist/THIRD_PARTY_LICENSES.txt.

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