OpenDocumentTextExporter is the standard exporter of AODL for the export of documents in the OpenDocument format.
Inheritance: IExporter, IPublisherInfo
Esempio n. 1
0
 private static void Save(IDocument spreadsheetDocument)
 {
     SaveFileDialog saveFileDialog = new SaveFileDialog();
     saveFileDialog.DefaultFileName = "DataGrid";
     saveFileDialog.DefaultExt = ".ods";
     if (saveFileDialog.ShowDialog() == true)
     {
         using (Stream stream = saveFileDialog.OpenFile())
         {
             using (InMemoryPackageWriter inMemoryPackageWriter = new InMemoryPackageWriter(stream))
             {
                 OpenDocumentTextExporter openDocumentTextExporter = new OpenDocumentTextExporter(inMemoryPackageWriter);
                 spreadsheetDocument.Save(saveFileDialog.SafeFileName, openDocumentTextExporter);
             }
         }
     }
 }