- Document Solutions for Excel, .NET Edition Overview
- Key Features
- Getting Started
- Features
- Templates
-
File Operations
- Import and Export .xlsx Document
- Export to PDF
- Export to HTML
- Import and Export CSV File
- Import CSV File with Custom Parser
- Import and Export CSV File with Delimiters
- Import and Export SpreadJS Files
- Import and Export Macros
- Import and Export Excel Templates
- Import and Export OLE Objects
- Convert to Image
- Import and Export Excel Options
- Document Solutions Data Viewer
- API Reference
- Release Notes
Import and Export OLE Objects
DsExcel .NET allows users to preserve OLE objects while opening and saving an Excel file. This feature is extremely useful when users need to deal with import and export of linked objects and embedded objects while working with spreadsheets.
With extensive support for importing and exporting OLE Objects, users can insert linked and embedded objects in their spreadsheets and then preserve these objects while saving the files with .xlsx or .xlsm extension. This feature also facilitates users to use the object linking and embedding (OLE) in order to load and save data from other programs, such as MS Word or MS Excel.
Example
For instance, let's say you work as a business analyst who wants to visualize information using charts.
You have a source file containing some data. But, you want the chart to be displayed in another file (called a destination file) that picks up data from the source file in order to create charts in the destination file. Now, whenever any changes are done in the data in the source file, obviously you would also want the chart to be updated (or in other words, the destination file to be updated).
That's where the role of supporting the import and export of OLE objects comes into picture. In such a scenario, DsExcel will ensure that the original data remains intact in the source file and the destination file represents the updated linked information (updated charts in this example) without impacting the storage of the original data.
Refer to the following example code in order to import and export spreadsheets containing OLE objects.
// Initialize workbook
Workbook workbook = new Workbook();
// Opening workbook with OLE object
workbook.Open("OleObjectExcelFile.xlsx");
// Saving workbook with OLE object
workbook.Save("OleOutExcel.xlsx");