Convert Visio to Excel format

Export to CSV

This article explains how to export a Microsoft Visio diagram to CSV using Aspose.Diagram for .NET API.

Use the Diagram class constructor to read the diagram files and the Save method to export the diagram to any supported image format.

To export VSD diagram to CSV:

  1. Create an instance of the Diagram class.
  2. Call the Diagram classs Save method and set the output format to CSV.

Export Microsoft Visio Drawing to CSV

The code samples show how to export Microsoft Visio Drawing to CSV using C#.

// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadSaveConvert();
// Call the diagram constructor to load a VSD diagram
Diagram diagram = new Diagram(dataDir + "ExportToCSV.vsd");
MemoryStream csvStream = new MemoryStream();
// Save diagram
diagram.Save(csvStream, SaveFileFormat.CSV);
// Create a CSV file
FileStream csvFileStream = new FileStream(dataDir + "ExportToCSV_out.csv", FileMode.Create, FileAccess.Write);
csvFileStream.WriteTo(csvFileStream);
csvFileStream.Close();
csvFileStream.Close();
// Display Status.
System.Console.WriteLine("Conversion from vsd to csv performed successfully.");