Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CSV to ArrayNew to Visual Studio Code? Get it now.
CSV to Array

CSV to Array

jesusnoel

|
1 install
| (0) | Free
Convert CSV files into C# arrays using an interactive table editor.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

csv-to-array

csv-to-array is a Visual Studio Code extension that converts CSV files into ready-to-use C# arrays. It displays your CSV in an interactive spreadsheet-like editor, lets you modify the data, and generates valid C# code for 2D matrices or 1D vectors that you can paste directly into your project. This project has the objective to convert a csv file (automaton representation) to data type.


Features

  • 📂 Open CSV in an editable grid

    • Load any .csv file into a clean interactive table inside VS Code.
    • Add or delete rows and columns.
    • Edit cell values in real-time.
  • 🔢 Generate C# arrays

    • Convert your CSV into:
      • A 2D multidimensional array (T[,])
      • A 1D vector (T[])
    • Output is already formatted and ready to paste.
  • 🧾 Header handling

    • Ignore first row as header (optional)
    • Ignore first column as header (optional)
  • 📋 Copy to clipboard

    • One-click button to copy the generated C# code.
  • 🧮 Numeric-friendly

    • Designed primarily for numeric matrix datasets.
    • String values are automatically wrapped in quotes.

Demo

csv-to-array demo

Usage

📌 Example

CSV Input

1,2,3 4,5,6 7,8,9

Generated C# 2D array

int[,] matrix = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };

Generated C# 1D vector

int[] values = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };

📦 Requirements

  • Visual Studio Code 1.xx.x or later
  • No external dependencies required

🐞 Known Issues

  • Large CSVs may take longer to render.
  • Mixed data types may require manual cleanup.
  • Currently, only C# array generation is supported.
  • Speially characters for strings is not supported yet.

📝 Release Notes

0.0.1

  • Initial release of csv-to-array
  • CSV grid editor (Webview)
  • Add/remove rows and columns
  • Generate C# 2D array and 1D vector
  • Copy generated array to clipboard

🤝 Contributing

Contributions are welcome!

Feel free to open issues, suggest enhancements, or submit pull requests.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft