VSNB (.vsnb)
- Import supports a subset of the Wolfram System notebook format.
- VS Code notebooks are based on the JSON file format that include Markdown cells for styled text, input cells that are text and output cells that are primarily text and images.
Background
-
- Visual Studio Code notebooks for Wolfram Language.
- JSON-based notebook file format used by the Wolfram Language extension for Visual Studio Code.
- Used for storing and exchanging Wolfram Language input and output.
- Stores text, graphics, images and other Wolfram Language input and output.
- Developed since 2024 by Wolfram Research.
Import & Export
- Import["file.vsnb"] reads a VS Code notebook and returns it as a Notebook expression.
- Import["file.vsnb",elements] imports the specified elements.
- The import format can be specified with Import["file","VSNB"] or Import["file",{"VSNB",elem,…}].
- See the following reference pages for full general information:
-
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Import elements:
-
"CellExpressions" list of Cell expressions "Notebook" notebook represented as a Notebook expression "NotebookObject" notebook represented as a NotebookObject "Plaintext" plain text version of the notebook
Examples
open all close allBasic Examples (1)
Import a "VSNB" notebook and return a NotebookObject:
Import["ExampleData/simple.vsnb"]Import a "VSNB" notebook, explicitly specifying the "VSNB" format:
Import["ExampleData/simple.vsnb", "VSNB"]List all elements supported by the "VSNB" import:
Import["ExampleData/simple.vsnb", "Elements"]Import a brief summary of a "VSNB" notebook, listing the format, file name and file size:
Import["ExampleData/simple.vsnb", "Summary"]Import the notebook as a CellObject list:
Import["ExampleData/simple.vsnb", "CellObjects"]Scope (1)
Import a "VSNB" notebook and return all the "Rules":
Import["ExampleData/simple.vsnb", "Rules"]Import a detailed "VSNB" notebook and return a NotebookObject:
Import["ExampleData/example.vsnb"]Import Elements (5)
"CellExpressions" (1)
"CellObjects" (1)
Import a "VSNB" notebook and return a list of cell objects:
Import["ExampleData/simple.vsnb", {"VSNB", "CellObjects"}]"Notebook" (1)
"NotebookObject" (1)
Import a "VSNB" notebook and return a NotebookObject:
Import["ExampleData/simple.vsnb", {"VSNB", "NotebookObject"}]"Plaintext" (1)
Import a "VSNB" notebook as plain text:
Import["ExampleData/simple.vsnb", {"vsnb", "Plaintext"}]Related Links
History
Introduced in 2026 (15.0)