{"slug": "xlide-vba-without-excel", "title": "XLIDE: VBA without excel", "summary": "XLIDE, a new open-source VS Code extension, enables developers to edit Excel VBA code directly within VS Code with syntax highlighting, symbol navigation, and GitHub Copilot integration, bypassing the need for Excel or COM automation. The tool, which works on Windows, macOS, and Linux, uses a Python backend with pyOpenVBA and openpyxl to read and write `.xlsm` files, allowing users to browse modules in a sidebar tree and save changes with Ctrl+S. This eliminates the requirement for an Office installation, making VBA development portable and accessible from remote containers.", "body_md": "Edit Excel VBA code directly in VS Code. Browse modules in a sidebar tree,\nedit with syntax highlighting and symbol navigation (Go to Definition,\nFind All References, Rename Symbol), save changes back to the `.xlsm`\n\nfile\nwith Ctrl+S, and expose every operation to GitHub Copilot via the Language\nModel API.\n\n**VS Code** 1.95+**Python 3.10+**-- the VBA read/write backend runs as a child process- Python packages:\n`pyOpenVBA >= 3.0.1`\n\n,`openpyxl >= 3.1.0`\n\nNo COM automation, no Office installation, no win32com -- works on Windows, macOS, Linux, and remote containers.\n\n```\ngit clone https://github.com/WilliamSmithEdward/xlide_vscode.git\ncd xlide_vscode\n\n# TypeScript side\nnpm install\nnpm run compile        # type-check + esbuild bundle -> out/extension.js\n\n# Python side (optional venv)\npython -m venv .venv\n.venv\\Scripts\\activate   # or: source .venv/bin/activate\npip install -r python/requirements.txt\n```\n\nPress **F5** in VS Code to launch an Extension Development Host with the\nextension loaded and the watch compiler running.\n\n```\nxlide_vscode/\n  src/\n    extension.ts            # activate() -- wires everything together\n    pythonBridge.ts         # JSON-RPC 2.0 client over child_process stdio\n    xlideFileSystem.ts      # xlide-vba:// virtual FileSystemProvider\n    xlsmExplorer.ts         # Sidebar TreeDataProvider\n    commands.ts             # VS Code command registrations\n    agentTools.ts           # vscode.lm.registerTool() for Copilot\n    moduleDump.ts           # Shared export-to-folder logic (UI + AI lane)\n    vbaSymbolIndex.ts       # In-memory cross-module symbol index\n    vbaLanguageProviders.ts # DocumentSymbol / Definition / References / Rename\n  python/\n    server.py               # JSON-RPC 2.0 server (stdin/stdout, newline-delimited)\n    xlide/\n      vba_io.py             # pyOpenVBA wrappers -- listModules, readModule, writeModule\n      excel_io.py           # openpyxl wrappers -- readCells, writeCells\n  syntaxes/\n    vba.tmLanguage.json     # TextMate grammar (MS-VBAL spec-accurate)\n  language-configuration/\n    vba-language-configuration.json   # Brackets, indent rules, folding\n  walkthrough/              # Markdown content for VS Code Getting Started tab\n  docs/\n    architecture.md         # Full architecture reference\n```\n\n| Decision | Rationale |\n|---|---|\n| Long-lived Python process | Amortises ~200 ms Python startup across all requests |\n`FileSystemProvider` over `TextDocumentContentProvider` |\nRead/write virtual FS -- Ctrl+S triggers `writeFile` with no custom save command |\nVirtual URI scheme `xlide-vba://` |\nDecouples workbook path + module name from the editor's file concept |\nShared `moduleDump.ts` |\nExport logic is single-source-of-truth for both UI commands and Copilot agent tools |\n| No COM / no Office | Portability -- pyOpenVBA reads the OVBA binary format directly |\n| Confirmation on write tools | Prevents AI agents from silently mutating production workbooks |\n\n| Method | Params | Returns |\n|---|---|---|\n`listModules` |\n`{ path }` |\n`[{ name, type }]` |\n`listSubs` |\n`{ path, module }` |\n`[{ name, kind, line }]` |\n`readModule` |\n`{ path, module }` |\n`{ source }` |\n`writeModule` |\n`{ path, module, source }` |\n`{}` |\n`renameModule` |\n`{ path, module, newName }` |\n`{}` |\n`deleteModule` |\n`{ path, module }` |\n`{}` |\n`readCells` |\n`{ path, sheet, range }` |\n`{ values }` |\n`writeCells` |\n`{ path, sheet, startCell, data }` |\n`{}` |\n\nRegistered as `vba`\n\nin `package.json`\n\nwith extensions `.bas`\n\n, `.cls`\n\n, `.frm`\n\n.\nThe TextMate grammar in `syntaxes/vba.tmLanguage.json`\n\nis scoped to\n`source.vba`\n\nand covers all reserved identifiers from MS-VBAL v20250520\n(section 3.3.5.2: statement-keywords, marker-keywords, operator-identifiers,\nreserved-names, special-forms, reserved-type-identifiers, literal-identifiers,\ndef-type directives, and implementation-reserved identifiers).\n\n| Command | Purpose |\n|---|---|\n`npm run compile` |\nType-check + dev bundle |\n`npm run watch` |\nIncremental type-check + esbuild watch |\n`npm run package` |\nProduction bundle (minified) |\n`vsce package --no-dependencies` |\nBuild `.vsix` for distribution |\n\n| Tool name | Reference | Reads/Writes | Confirm |\n|---|---|---|---|\n`xlide_listModules` |\n`#xlideListModules` |\nR | No |\n`xlide_listSubs` |\n`#xlideListSubs` |\nR | No |\n`xlide_readModule` |\n`#xlideReadModule` |\nR | No |\n`xlide_writeModule` |\n`#xlideWriteModule` |\nW | Yes |\n`xlide_readCells` |\n`#xlideReadCells` |\nR | No |\n`xlide_writeCells` |\n`#xlideWriteCells` |\nW | Yes |\n`xlide_exportModules` |\n`#xlideExportModules` |\nW | Yes |\n`xlide_configureExportMode` |\n`#xlideConfigureExportMode` |\nW | Yes |\n\nStored beside each workbook as `<workbookname>.extension.repo.json`\n\n:\n\n```\n{\n  \"exportFolder\": \"C:/absolute/path/to/export\",\n  \"exportMode\": \"trueUp\",\n  \"managedFiles\": [\"Module1.bas\", \"Sheet1.cls\"]\n}\n```\n\n`trueUp`\n\n(default) -- replace existing, add new, delete stale files tracked in\n`managedFiles`\n\n. `replaceExistingOnly`\n\n-- only replaces files already on disk.\n\nXLIDE VBA browsing for Live Share **guests** is currently not supported.\nMicrosoft's Live Share platform restricts the shared-service RPC channel\n(`vsls.shareService`\n\n) to extensions on a curated first-party allowlist, so\nthird-party extensions like XLIDE cannot proxy VBA read/write calls from a\nguest to the host. The XLIDE Explorer therefore returns an empty tree for\nguests and shows an informational welcome view.\n\nWhat still works in a Live Share session:\n\n| Role | XLIDE behaviour |\n|---|---|\nHost |\nFull local VBA editing -- open, edit, save `.xlsm` /`.xlsb` /`.xlam` modules exactly as if no session were active. |\nGuest |\nCan fully view and edit any VBA module the host has open in the editor (Live Share shares those buffers normally). Cannot browse the XLIDE Explorer or open new modules independently -- only the host can navigate and open them. XLIDE panel shows a \"not supported\" notice. |\nGuest without XLIDE installed |\nNo action needed -- XLIDE is host-only. Joining a session does not require the extension. |\n\nRelated upstream issue: [microsoft/live-share#4877](https://github.com/microsoft/live-share/issues/4877)\n(third-party `shareService`\n\nallowlist, closed as Not Planned).\n\n[docs/architecture.md](/WilliamSmithEdward/xlide_vscode/blob/main/docs/architecture.md)-- full architecture reference[MS-VBAL specification](https://learn.microsoft.com/en-us/openspecs/microsoft_general_purpose_programming_languages/ms-vbal/)[pyOpenVBA](https://github.com/WilliamSmithEdward/pyOpenVBA)", "url": "https://wpnews.pro/news/xlide-vba-without-excel", "canonical_source": "https://github.com/WilliamSmithEdward/xlide_vscode", "published_at": "2026-05-27 12:08:18+00:00", "updated_at": "2026-05-27 12:17:06.195320+00:00", "lang": "en", "topics": ["ai-tools"], "entities": ["VS Code", "GitHub Copilot", "pyOpenVBA", "openpyxl", "XLIDE"], "alternates": {"html": "https://wpnews.pro/news/xlide-vba-without-excel", "markdown": "https://wpnews.pro/news/xlide-vba-without-excel.md", "text": "https://wpnews.pro/news/xlide-vba-without-excel.txt", "jsonld": "https://wpnews.pro/news/xlide-vba-without-excel.jsonld"}}