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

AK Workbook Lens - Excel & Data Viewer

Ali Khawaja

|
7 installs
| (0) | Free
View Excel, CSV and TSV files locally. Explore, sort, filter and export tabular data without changing the source.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AK Workbook Lens - Excel & Data Viewer

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

AK Workbook Lens showing a formatted worksheet in a dark theme

Inspect workbooks without leaving your editor: resize columns, freeze headings, search, combine sort/filter rules, manage columns, profile data and inspect full cells/records. Choose the actual header row and jump to original source addresses. Export the current view or selection as CSV/TSV without changing the source.

Install

Search for AK Workbook Lens in VS Code's Extensions panel, or run:

code --install-extension alikhawaja.workbook-lens

For manual installation, use Extensions: Install from VSIX... and select workbook-lens-0.5.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 AK Workbook Lens: Open Workbook for Excel, CSV or TSV. If another extension handles it, right-click the editor tab and select Reopen Editor With... > AK Workbook Lens. After an update, use Developer: Reload Window.

Previously named Workbook Lens, the product is now AK Workbook Lens. The extension ID remains alikhawaja.workbook-lens, so existing installations continue receiving updates without reinstalling.

This replaces the development extension techdemos.local-excel-viewer; remove that older extension if installed to avoid two viewers competing for .xlsx files.

CSV and TSV import

CSV/TSV keep their normal text editor by default. Right-click the editor tab and select Reopen Editor With... > AK Workbook Lens (CSV/TSV), or use AK Workbook Lens: Open Workbook to select a file.

  • Delimiters are detected from the first 32 nonempty records: comma, tab, semicolon or pipe. The file extension breaks ties. Use Text import to override ambiguous detection, then click Reload text.
  • Encoding defaults to UTF-8, or UTF-16 LE/BE when a byte-order mark is present. UTF-8, UTF-16 LE/BE and Windows-1252 can be selected explicitly. Invalid decoding is reported; import controls remain available so you can correct it.
  • Quoted separators, doubled quotes, multiline fields, empty fields and ragged records are supported. Malformed quotes are rejected with a record number.
  • All fields stay text: leading zeros, date strings and formula-like strings are preserved. Formulas are never executed. Optional per-column interpretation enables numeric/date analysis without changing displayed, copied or exported text.
  • Use header row and Header source row select the original record to retain as a header. Records above it are excluded from the view, not deleted. The retained record is excluded from sorting/filtering, profiling and distinct-value lists. Column headings show its values alongside original letters.
  • Import options are remembered per file in this VS Code workspace.

Export CSV and TSV

Choose CSV or TSV, then Export view for the current worksheet in its filtered/sorted order, or Export selection for the selected rectangle in that view. Hidden columns are omitted, and reordered/pinned columns follow their visible order. A retained header row is included in whole-view exports; introductory rows above a selected header are excluded. Hidden worksheets can be selected and exported just like other worksheets.

Exports contain displayed values, not formatting, formulas or other worksheets. Files use UTF-8 without a BOM, CRLF record separators and quoted/escaped fields. Embedded newlines remain unchanged. Exporting an empty view produces an empty file. Choose a new filename: existing files, including the source, are not overwritten. Canceling the save dialog writes nothing.

Values are preserved unchanged. If any value starts with a formula-like prefix (=, +, - or @, possibly after whitespace), a confirmation warns that spreadsheet applications may interpret it as a formula. Open untrusted exports as text. Export does not make arbitrary spreadsheet content safe.

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 and column reordering. Filtered-out/introductory rows, hidden columns or source ranges that are no longer contiguous produce an explicit error. Change the header, show columns or clear rules as appropriate.
  • The status bar shows selection count (nonempty saved values), sum and average. Numeric cached formula results and explicitly interpreted CSV/TSV numbers are included. Dates, booleans, unparsed 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. Widths follow their source columns when columns are reordered or pinned.

Column menus and column management

Click a column heading (or focus it and press Enter, Space or Down) to open its actions. The menu provides sorting, filtering, distinct values, profiling, fitting, pinning and hiding; CSV/TSV columns also offer analysis-type interpretation. Escape closes the menu and restores focus. Heading indicators show sort direction and priority, active filters and pinned columns. Column rules expands the advanced form when you need to combine conditions; it starts collapsed.

Click Columns to search source letters/header names and manage the layout. Show/hide columns with checkboxes, move them Earlier/Later, or Pin them. Pinned columns move to the left and stay frozen as viewport space permits. Columns move within their pinned/unpinned group; unpin first to cross groups. At least one column must remain visible. Lists are paged in batches of 100 and header labels are limited to 200 characters; inspect the original header cell for its complete value.

Copy, search, selection statistics and export use visible column order. Existing filters and sort rules still apply to hidden source columns and remain visible as chips. Hiding is only a layout preference, not a confidentiality boundary: the row inspector can still show hidden fields. Reset columns restores all columns in source order and removes pins without removing sort/filter/type rules.

Flexible header rows

Enable Use header row, enter its original one-based row number, then click Apply header. For a report whose title occupies rows 1-2, choose row 3. That row becomes the first retained row; data starts after it. Original addresses and row labels remain unchanged. The header stays out of analysis and filtering, but is included in whole-view exports. The displayed matching-row count excludes both introductions and the retained header.

Disable Use header row and apply to view every source row again; no rows are implicitly skipped in that mode. Header selection is remembered per worksheet. The source file is never edited.

Cell and row inspector

Select a cell and click Inspect. The side panel shows the full displayed value, raw/cached value, saved type, analysis type, number format and formula when present. Long and multiline values wrap in selectable, scrollable text rather than being cut off by the grid. Formula values are saved results, not recalculations; missing results are explicitly labeled. Raw dates use ISO/UTC representation.

The complete source record appears below, including fields hidden in the grid. Choose 1, 5, 20 or 50 fields per page and use Previous fields/Next fields for wide records. Field labels include original addresses. Inspection follows the selected source row even after sorting, filtering or column reordering. Requests are limited to 2,000,000 characters across displayed/raw values and formulas; oversized requests fail explicitly rather than silently truncating. Use fewer fields per page when a record is too large. A single oversized cell may still exceed this limit. No source values are modified.

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 a sort order and filter condition, then click Apply column rules in the expanded Column rules section. Alternatively, open a column-heading menu. Repeat for other columns to combine rules. Column letters in rules always identify original source columns.

  • Support up to 16 prioritized sort columns and one filter per column (32 total). Applying another column preserves existing rules. Reapplying a column replaces its filter and updates its sort rule in place; a new sort is appended.
  • Filters combine with AND. Conditions include case-insensitive contains, equals/does-not-equal, greater/less-than comparisons (inclusive variants too), blank/not-blank and exact selected values. Blank means an empty displayed value, not whitespace. Empty Contains removes that column's filter.
  • Numeric comparisons use finite numbers without grouping separators. Date comparisons use YYYY-MM-DD. Native Excel numbers/dates use their saved values; CSV/TSV comparison filters require an explicitly interpreted column.
  • Choose values lists distinct displayed strings from rows matching the other filters, excluding a retained header. Check values and click Apply column rules. Matching is case-sensitive and exact, even for interpreted columns. Selecting none matches no data rows. Lists are capped at 200 values / 200,000 characters; truncation is shown and unlisted values are excluded, not implicitly selected. Very long values (over 32,767 characters) cannot be listed.
  • Use header row keeps the chosen source row in place and out of filtering.
  • Numbers/dates sort by value; text uses natural, case-insensitive collation. Numeric/date values precede text in mixed columns in either direction; empty/missing values sort last. Ties are resolved by the next sort column, then original source order.
  • Active chips show sort priority, filters and interpreted columns. Remove a chip to remove its rule; Earlier promotes a sort rule one priority. The matching-row count excludes a retained header and labels it separately.
  • Original row labels, addresses and formulas remain unchanged.
  • Copy, search, go-to, selection statistics and frozen panes use the resulting view.
  • Clear rules restores source row order and removes filters, keeping column layout, pins and interpretation. Reset view also removes interpretation, restores all source columns and removes pins. Both preserve the current header choice and manual widths.
  • Sorting/filtering never changes or saves the source workbook.

Optional CSV/TSV interpretation

Select a column, choose Interpret column: Number or ISO date, then click Apply column rules. Text remains the default. Numbers accept optional signs, decimals and exponents; grouping separators, currency symbols and nonfinite values are not accepted. Dates must be valid calendar dates in exact YYYY-MM-DD form and are interpreted at UTC midnight, not inferred from locale.

Unparseable nonempty values remain text and are counted as Text/unparsed in the profile. Interpreted numbers participate in sorting, comparisons, selection statistics and profiling; dates participate in date sorting/comparisons and date ranges, not numeric sums. Leading zeros, original date strings and formula-like text are preserved in the grid, clipboard and exports. Excel columns use native saved types; this override is offered only for CSV/TSV. Remove comparison filters before removing an interpretation they require, or use Reset view.

Column profiling

Enter a column letter and click Profile column after applying any pending rule/type changes. The profile covers current filtered rows, excluding a retained header. It shows row/blank counts, distinct displayed values (including blank), counts by interpreted/native type, numeric min/max/sum/average and earliest/latest dates in UTC. Empty results show no average or range. Formula cells without a saved result count as text, not blanks; their visible [No saved result] warning is preserved.

Distinct counting is bounded to 100,000 values / 2,000,000 characters; if exceeded, the displayed count is labeled at least. It is not a full enumeration of arbitrarily large columns. Profiling never modifies the workbook.

Widths, column layout/pins, freeze choices, interpretation 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 AK 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, .csv and .tsv data viewing. Excel cached formula results 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.

Password-encrypted and IRM-protected files

AK Workbook Lens cannot open password-encrypted or IRM/rights-managed workbooks. Office compound containers receive specific guidance, but their signature alone does not identify the protection type: legacy Excel files can use the same container. Other unsupported or invalid packages receive a general format error.

The error panel offers Open in Excel on local Windows files, even when the viewer cannot load them. This is an explicit handoff, not decryption or an automatic launch. Installed Excel handles passwords, organizational sign-in and rights-management permissions. If Excel is missing, the launch error is reported. On other platforms or remote workspaces, open the original file manually in an authorized Excel client.

Your organization's restrictions on viewing, copying, exporting and expiry continue to apply in Excel. Do not remove protection or save an unprotected copy unless your organization permits it. AK Workbook Lens does not request or store passwords, obtain rights-management licenses, or bypass protection.

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. CSV/TSV import is limited to 2,000,000 fields (including empty fields), 1,048,576 rows and 16,384 columns. Export is limited to 1,000,000 cells and 20 MiB of UTF-8 text per operation; export a smaller selection when necessary. These operations are bounded but not streaming imports of arbitrarily large files.

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 22+ and npm for development and packaging.

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, dist/viewer-preview.png, dist/exploration-preview.png and dist/v05-preview.png.

The Validate extension workflow checks types, model/extension-host behavior, the Edge viewer and VSIX packaging on pushes and pull requests. It has read-only repository permissions and never publishes. Synthetic fixtures in test/fixtures exercise combined filters, sort priorities, dates, flexible headers, mapped source columns, inspection and preserved leading-zero text.

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: AK 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.

Token-free publishing from GitHub Actions

The manually triggered Publish Marketplace extension workflow in .github/workflows/publish.yml checks types, runs model/extension-host and Edge tests, packages the current version, then publishes that VSIX using OIDC. It only runs its publishing job on main; pushes do not automatically publish. No PAT or repository secret is required.

Before its first run, create a policy in the publisher dashboard under Trusted Publishing > Create with:

  • Policy name: Workbook Lens releases
  • Repository owner: alikhawaja
  • Repository: workbook-lens
  • Workflow: publish.yml
  • Environment: leave empty (the workflow does not use a GitHub environment)

After saving the policy, open the repository's Actions tab, choose Publish Marketplace extension, and select Run workflow on main. Bump the package version and update CHANGELOG.md before later releases. Publishing a version that already exists fails explicitly.

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 delimited export.
  • src/delimited.ts: text decoding, delimiter detection, quoted-field parsing and escaping.
  • src/views.ts: legacy view normalization and strict number/ISO-date interpretation.
  • 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