Excel for WPF and Silverlight Overview > Key Features |
The following are some of the main features of Excel for WPF and Silverlight that you may find useful:
Excel for WPF and Silverlight is easy-to-use, allowing you to use a single command to load or save a workbook and manipulate sheets as if they were grid controls.
After loading or creating a C1XLBook, you can access data in individual sheets as if they were a simple grid. For example:
XLSheet sheet = C1XLBook.Sheets[0];
sheet[0, 0].Value = DateTime.Now;
The format associated with each cell is as easy to access as the data stored in the cell. For example:
C# |
Copy Code
|
---|---|
XLStyle style = new XLStyle(c1XLBook1); style.Format = "dd-MM-yyyy"; style.Font = new XLFont("Courier New", 14); XLSheet sheet = c1XLBook1.Sheets[0]; sheet[0, 0].Value = DateTime.Now; sheet[0, 0].Style = style; |
Other ComponentOne components use C1Excel to export XLS files. For example, C1Report uses C1Excel to create XLS versions of reports so they can be viewed and edited by anyone with a copy of Microsoft Excel.
Excel for WPF and Silverlight reads and writes .xls (Excel 97 and later) and xlsx (OpenXml format) files, the latter of which can be reused and easily exchanged or compressed to create smaller file sizes. You don't even need to have Microsoft Excel installed.
Not only can you add images to cells, but now you can specify the cell size, the position of the image within the cell and whether the image is scaled, clipped, or stretched to fit the cell.
Workbooks can now be directly read to and written from memory streams with new overloads for the Load and the Save methods so you no longer have to use temporary files.
Use properties in the XLPrintSettings class to add images to the left, center, or right part of a sheet's header or footer.