Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Excel, Word sidekickNew to Visual Studio Code? Get it now.
Excel, Word sidekick

Excel, Word sidekick

PrasertKana

|
344 installs
| (0) | Free
View Word (.docx, .doc, .dotx, .dotm), OpenDocument (.odt) and Excel (.xlsx, .xls) files inside VS Code (read-only)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Excel and Word Sidekick

Read-only viewer for Word (.docx, .doc), Word templates (.dotx, .dotm), OpenDocument text (.odt), and Excel (.xlsx, .xls) files inside VS Code.

  • Docx: rendered as clean, readable HTML (mammoth.js) with images and tables, matching your editor theme. Word templates (.dotx, .dotm) are the same format underneath and render through the same path.
  • Odt: OpenDocument text rendered with headings, bold/italic/underline, ordered and bulleted lists, tables (including merged cells), hyperlinks, footnotes, and embedded images. Document colours and page layout are not reproduced — the text takes your editor's theme, the same way the Word viewer does.
  • Xlsx: virtualized, sortable grid that stays responsive on 100k+ row sheets, with sheet tabs, merged cells, Excel number formats, basic cell styling, data profiles, frozen panes, column resizing, Excel-style cell/range/row/column selection, keyboard navigation, and selected-column export. The same viewer is used for legacy .xls workbooks after in-memory conversion.

Legacy Office 97–2003 formats are also supported:

  • Xls: converted to the modern format in memory (SheetJS) and shown in the same grid — values, number formats, merged cells, and column widths are preserved; rich cell styling may be limited.
  • Doc: text-only — paragraph text is extracted (word-extractor) and shown with a notice; formatting, images, and tables are not preserved.

All viewers auto-reload when the file is saved from Excel, Word, or LibreOffice, keeping your place. In a workbook, Ctrl+C copies the active cell or the selected cells, rows, or columns as TSV. PK: Export Active Sheet as CSV saves the current sheet, while the grid's Export menu saves selected columns in CSV, TSV, PSV, or JSON form. Workbook parsing runs in a worker thread, so even huge files never freeze VS Code.

Files are never modified. Use Open With… → Text Editor to see the raw file instead.

Workbook grid controls

Both toolbars are icon-only, so a wide sheet keeps its rows instead of losing one to a second row of buttons. Hover any button to read what it does; a highlighted button is switched on. The names in bold below are the ones its tooltip uses.

Sort and select

Sorting is available for database-style sheets whose first row contains a non-empty, unique text header in every used column. Click a column header to cycle through ascending, descending, and the workbook's original row order. The active direction is shown with ▲ or ▼. Row 1 stays fixed, equal values retain their original order, and each eligible sheet remembers its own sort. On other sheets, clicking a column header selects it without rearranging any rows.

A plain left-click also selects the column. Shift+click selects a header range without sorting. Ctrl/Cmd+click toggles individual rows or columns and never changes the active sort; for columns it also turns off Column colors and Focus Cell so the multi-selection stays clear. Ctrl/Cmd+Shift+click adds a range. Right-click a header to select it without changing the sort.

Drag across cells to select a rectangular range, or click the upper-left corner where the row and column headers meet to select every cell, as in Excel. Press Escape or click empty grid space to clear the selection.

Keyboard navigation

Focus the grid and use Arrow keys, Home, End, Page Up, Page Down, Tab, Shift+Tab, Enter, or Shift+Enter to move the active cell. Ctrl/Cmd+Arrow jumps to the edge of the displayed sheet, Ctrl/Cmd+Home and Ctrl/Cmd+End move to opposite corners, and Ctrl/Cmd+Page Up or Page Down switches sheets. Hold Shift with movement keys to extend a cell range; Ctrl/Cmd+Shift+Arrow extends it to an edge.

Ctrl/Cmd+A selects all cells. Ctrl/Cmd+Space selects the active column, Shift+Space selects the active row, and Ctrl/Cmd+Shift+Space selects all cells. When Focus Cell is enabled without an existing cell selection, the viewer activates the upper-left visible cell automatically.

Resize and format

Drag the right edge of a column header to resize it; widths cannot go below 40px. Double-click the edge to fit that column to its cached values, up to 400px, or run PK: Auto-fit All Columns to fit every column. Resizing works in both scrolling and frozen headers.

Column colors gives adjacent columns distinct, theme-friendly tints. It is off until you ask for it — set officeViewer.columnColors to true to have every sheet open with the tints already on. Enabling Focus Cell temporarily turns those colors off and disables their button so the active row-and-column cross remains clear. Leaving Focus Cell restores the exact previous color setting.

The compact comma button adds thousands separators to plain numeric cell text, including integers larger than JavaScript can represent exactly. This is display only: cell tooltips, copying, and CSV export keep the original text. Exponents and non-numeric text are unchanged.

Tail 10 switches the grid to the sheet's final ten rows. Click it again to restore the complete sheet.

Copy and context menu

Ctrl/Cmd+C copies one or more selected rows or columns, a rectangular cell range, all cells, or the active cell when there is no larger selection. Selected columns include their headers and every value—not just visible or cached rows—and values follow the current sort order. Copying remains exact and does not include display-only thousands separators.

When multiple rows are selected, Copy with header (Ctrl/Cmd+Shift+C) prepends the sheet's first row once. Right-clicking labels the operation for the current selection: Copy Cell, Copy Cells, Copy Row(s), Copy Column(s), or Copy all cells. Because the viewer is read-only, its context menu does not offer Cut or Paste.

Export selected columns

On database-style sheets whose first row contains unique text headers, select one or more column headers and open Export in the toolbar or context menu. The selected columns can be saved as CSV, TSV, PSV (pipe-separated values), or a JSON array where each row is an object keyed by the column headers. Exports include all sheet rows and respect the current sort. The original workbook is never changed.

Freeze panes and profiles

Freeze panes saved in the workbook are honored. To define your own split, select a cell and click Freeze panes: selecting B3, for example, freezes rows 1–2 and column A. The button then stays highlighted and removes the split on the next click. Each sheet remembers its setting until the viewer closes.

Turn on Data profile to calculate full-sheet type, completeness, uniqueness, range, and distribution summaries in the worker thread. Profile Card presents the same full-sheet profile as equal-size cards that wrap across rows and scroll vertically. Use Download PNG in the Profile Card heading to save the complete wrapped profile, including cards outside the visible scroll area.

The XLSX loader accepts standards-compliant OOXML whose spreadsheet and document property elements use explicit namespace prefixes (for example x:worksheet or ap:Properties). These prefixes are normalized only in the in-memory copy sent to the parser; the file on disk is untouched.

Viewer theme

Both viewers follow your VS Code color theme by default. The Theme button in either toolbar cycles that choice — its glyph shows which one is in force, sun and moon together for VS Code, then the sun for Light and the moon for Dark — and the two forced themes ignore the VS Code theme entirely, so you can read a spreadsheet on white while the rest of the editor stays dark. PK: Switch Viewer Theme in the Command Palette does the same thing and works whether or not a viewer has focus.

Both forced themes are built for colour-vision deficiency. They come from the Okabe-Ito colourblind-safe palette, nothing in the chrome depends on telling red from green (blue is the accent; the warnings are vermillion and amber, which stay apart under protanopia, deuteranopia and tritanopia), text pairs hold 4.5:1 or better, and the borders that delimit menus, inputs and panels hold 3:1. A unit test checks all of that, and checks that no colour in the stylesheets was left following the host theme by accident.

The choice is stored in the officeViewer.theme setting rather than per file, so one click changes every open viewer at once and the choice survives a reload. Set it directly in Settings if you would rather not use the button. Fonts always stay on your VS Code editor font.

Open in the desktop app

The viewer is read-only, so it hands editing back to Office. Right-click a file in the Explorer — or click the ↗ button in the editor title bar while you are reading one — to open it in the desktop application:

  • Open in Excel Desktop: .csv, .tsv, .tab, .psv, .txt, .xlsx, .xlsm, .xls
  • Open in Word Desktop: .docx, .doc, .dotx, .dotm, .odt
  • Open in PowerPoint Desktop: .pptx, .ppt

Select several files first and one right-click opens them all. The original file is opened in place, so whatever you save in Excel or Word goes straight back to the file you clicked — with one announced exception, below.

Windows and macOS only, and the file must be a local one: a file on a remote or virtual file system would open on the machine holding it rather than the one in front of you, so the command reports that instead. Note that Excel reads .csv and .xlsx directly but does not recognize the .psv, .tab, or .txt conventions, so those arrive as a single column unless you run Excel's text import.

UTF-8 text files

Excel reads a text file that carries no byte order mark using the system's legacy code page, so a UTF-8 .csv holding Thai, accented, or CJK text opens as mojibake. When a .csv, .psv, .tsv, .tab, or .txt file is UTF-8 and has no BOM, the extension therefore writes a copy that starts with one, opens that copy instead of the original, and says so. Edits you save in Excel then land in the copy, not in your file. The original is never rewritten.

Everything else is opened in place as before: files that are plain ASCII, files that already carry a BOM, files that are not valid UTF-8 (a Windows-874 or Windows-1252 export, say — a BOM there would make the text worse), spreadsheets, and anything larger than 64 MB. The copies live in the extension's global storage folder and are deleted a day later.

Remote repositories

The viewer supports files opened through VS Code Remote - SSH, WSL, Dev Containers, Codespaces, and desktop virtual workspaces such as Remote Repositories. Install the extension in the location offered by VS Code, then open the Office file normally or use Open With….

Virtual repositories can be read-only. Viewing still works in that case; CSV export asks for a separate writable save location.

The browser-only editors at vscode.dev and github.dev are not currently supported because workbook parsing uses the Node.js extension host.

Development

See DEV.md for build, test, and packaging instructions.

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