The FromList method will create a RuntimeCsvRepresentation according to the object passed to it. This method can be used to generate a RuntimeCsvRepresentation which can be saved to disk to create a CSV.
The following code will create a RuntimeCsvRepresentation from a list of Vector3's:
The FromList method will ignore any fields or properties which have the XmlIgnore attribute. This allows objects which are built for XmlSerialization to serialize the same using RuntimeCsvRepresentations.
The GenerateCsvString method can be used to generate a string in CSV format. The resulting string can be saved to a file to create a CSV which can be opened in any application that supports CSVs.
The following code shows how to use the GenerateCsvString method:
The result string will contain:
The RuntimeCsvRepresentation class is a general-purpose class which represents a CSV file. It can be easily created through the CsvFileManager.
RuntimeCsvRepresentations can be loaded as follows:
For more information see the CsvFileManager page.
Did this article leave any questions unanswered? Post any question in our forums for a rapid response.