-
Couldn't load subscription status.
- Fork 41
RadSpreadStreamProcessing: Upated in the Workbook article. Added info… #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,10 +55,23 @@ The code from **Example 1** creates an empty workbook and exports it to an XLSX | |
| } | ||
| {{endregion}} | ||
|
|
||
| >IWorkbookExporter inherits from [IDisposable](https://msdn.microsoft.com/en-us/library/system.idisposable(v=vs.110).aspx). Make sure the object is disposed when you are done with it. Otherwise, the content won't be written in the exported file. The best way to ensure this is handled properly is to wrap it in a *using* statement. | ||
| __Append content to the opened stream__ | ||
|
|
||
| The __CreateWorkbookExporter__ method creates a new workbook which overrides the content of the stream if it's not empty. You can change that by using the second overload of the CreateWorkbookExporter method and pass the export mode explicitly. You can do that via the last parameter of the method (exportMode) which is of type __SpreadExportMode__. SpreadExportMode is an enum that exposes two constants - __Create__ and __Append__. The default export mode is Create which overrides the stream's content. If you set the export mode to __Append__, an existing workbook from the stream will be opened if there is any content in it. Then you can append the new content to it. | ||
|
||
|
|
||
| #### **[C#] Example 2: Create IWorkbookExporter and append the content from the stream** | ||
|
|
||
| {{region cs-radspreadstreamprocessing-model-workbook_1}} | ||
| IWorkbookExporter workbook = SpreadExporter.CreateWorkbookExporter(SpreadDocumentFormat.Xlsx, stream, SpreadExportMode.Append)); | ||
| {{endregion}} | ||
|
|
||
| >tip The Аppend mode is not supported in Xamarin. | ||
|
|
||
| <!-- --> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Delete that? |
||
|
|
||
| >IWorkbookExporter inherits from [IDisposable](https://msdn.microsoft.com/en-us/library/system.idisposable(v=vs.110).aspx). Make sure the object is disposed when you are done with it. Otherwise, the content won't be written in the exported file. The best way to ensure this is handled properly is to wrap it in a *using* statement. | ||
|
|
||
| # See Also | ||
| ## See Also | ||
|
|
||
| * [Worksheets]({%slug radspreadstreamprocessing-model-worksheet%}) | ||
| * [SpreadCellStyle API Reference](http://docs.telerik.com/devtools/document-processing/api/html/T_Telerik_Documents_SpreadsheetStreaming_SpreadCellStyle.htm) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Append Content to an Existing Document (format it as a heading)