With RadSpreadStreamProcessing you can export spreadsheet documents to the following file formats:
The library writes dynamically the document content into a specified stream. To achieve this, each of the classes responsible for exporting the elements of the document implement IDisposable and writes the corresponding content and settings to the stream once it is disposed.
This is why the elements in RadSpreadStreamProcessing must be created and disposed following a predefined sequence, which is described in the Getting Started article.
The supported formats require to follow different patterns when writing a document and because each element is written in the stream once you are done with it instead of writing the whole document at once, the desired format must be specified when you start creating the document. In other words, when instantiating IWorkbookExporter.
As of R3 2017, the encoding used to export CSV documents is UTF-8 with BOM.
Example 1: Specify export format
IWorkbookExporter workbook = SpreadExporter.CreateWorkbookExporter(SpreadDocumentFormat.Csv, stream);
Instantiating IWorkbookExporter directly starts the creation of the file using the Stream instance passed as a parameter to the CreateWorkbookExporter() method. Writing the document content finishes once the IWorkbookExporter instance is disposed.