Multiple Format Support
ReoGrid supports loading and saving Excel xlsx file format, import and export CSV file, output spreadsheet to printer or preview on screen, generate worksheet as HTML or PDF.
Workbook Input & Output API
ReoGrid control itself is workbook, both screen workbook control and memory workbook has same APIs.
var workbook = reoGridControl;
To load Excel workbook:
workbook.Load(path, IO.FileFormat.Excel2007);
ReoGrid will create and load all worksheets from the Excel file automatically. To save Excel file:
workbook.Save(path, IO.FileFormat.Excel2007);
Supported objects
Loading or saving the following objects from/to an Excel is supported:
- Loading or saving the entire workbook (all worksheets)
- Setting the visbility of Row and column header
- Cell styles (font, color, alignment, etc.)
- Cell data and data formats (number, currency, percent, etc.)
- Cell Borders
- Formulas (reference relations and calculation chain)
- Named range definitions definitions
- Images
- Floating objects
- Chart
Not supported objects
Loading or saving the following objects is not supported yet:
- Paging and Print
- Outlines
- Conditional style triggers
- Pivot table & database connections
- Some formula functions & VBA
Available function list
See Excel-Compatible Function List.
Memory Workbook
ReoGrid also provides an off-screen interface that has the ability to load and save spreadsheets without a GUI. This feature is typically used for importing and exporting Excel files and handling data on the background or server side.
Typical usage of memory workbook
Create memory workbook instance, then load or save spreadsheet as Excel format.
// create memory workbook
var workbook = ReoGridControl.CreateMemoryWorkbook();
// load Excel workbook from stream
workbook.Load(stream, FileFormat.Excel2007);
// save stream as Excel workbook
workbook.Save(stream, FileFormat.Excel2007);
Learn more about memory workbook.