Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Excel Text to NumPy ArrayNew to Visual Studio Code? Get it now.
Excel Text to NumPy Array

Excel Text to NumPy Array

LueQing

|
35 installs
| (0) | Free
Convert Excel-copied tabular text into Python NumPy np.array literals.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Excel Text to NumPy Array (VS Code Extension)

Convert text copied from Excel (tabular text) into Python np.array([...]) literals or LaTeX matrices.

Usage

  1. Paste or type the Excel-copied table into a VS Code editor.
  2. Select the table text.
  3. Run one of the commands:
    • Excel: Convert Selection to NumPy Array
    • Excel: Convert Selection to LaTeX Matrix
    • Excel: Convert Selection to MATLAB Matrix

If no text is selected, the extension shows: No text selected.

Output examples

Input:

1	2
3	4

NumPy output:

np.array([[1, 2],
          [3, 4]])

LaTeX output:

\begin{bmatrix}
  1 & 2 \\
  3 & 4
\end{bmatrix}

MATLAB output:

A = [1 2;
     3 4];

Settings (excelToNumpy)

  • excelToNumpy.indentSpaces (number, default: 10)
  • excelToNumpy.useMultiline (boolean, default: true)
  • excelToNumpy.emptyCellValue ("None" | "nan" | "''", default: "None")
  • excelToNumpy.strictRectangular (boolean, default: false)
  • excelToNumpy.valueMode ("auto" | "string" | "float" | "raw", default: "auto")
  • excelToNumpy.dtype (string, default: "")

Value typing (auto)

Order: integer -> float -> boolean -> leading apostrophe string -> string. Strings are emitted as Python single-quoted literals (NumPy) or escaped text (LaTeX) as needed.

Development

  • Install dependencies: npm install
  • Build: npm run compile
  • Test: npm test
  • Package: npm run package (produces a .vsix)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft