SpreadsheetGear
SpreadsheetGear Assembly
See Also  Send Feedback

The SpreadsheetGear.dll assembly enables developers to add ASP.NET Excel Reporting, Windows Forms spreadsheet controls, chart and range image rendering, Excel compatible charting, Excel compatible calculations and much more to Microsoft .NET Framework Solutions.

Namespaces

NamespaceDescription
SpreadsheetGearThe SpreadsheetGear namespace consists primarily of interfaces and enumerations which provide access to the SpreadsheetGear spreadsheet model.
SpreadsheetGear.Advanced.CellsThe SpreadsheetGear.Advanced.Cells namespace provides a high performance API for getting and setting the values and formulas of cells.
SpreadsheetGear.ChartsThe SpreadsheetGear.Charts namespace provides a comprehensive API for creating and modifying charts.
SpreadsheetGear.CustomFunctionsThe SpreadsheetGear.CustomFunctions namespace provides an API for defining custom functions which may be added to a workbook set.
SpreadsheetGear.DataThe SpreadsheetGear.Data namespace consists of SpreadsheetGear items which pertain to the System.Data namespace.
SpreadsheetGear.DrawingThe SpreadsheetGear.Drawing namespace consists of classes related to drawing such as the System.Drawing.Image class which enables creating images from charts and ranges.
SpreadsheetGear.Drawing.Printing 
SpreadsheetGear.ShapesThe SpreadsheetGear.Shapes namespace provides an API for manipulating shapes which are owned by a sheet.
SpreadsheetGear.ThemesThe SpreadsheetGear.Themes namespace provides an API for Microsoft Office compatible themes.
SpreadsheetGear.Windows.FormsThe SpreadsheetGear.Windows.Forms namespace includes the WorkbookView Windows Forms Control as well as the Workbook Designer, Workbook Explorer and Range Explorer.

Remarks

The SpreadsheetGear API is familiar to developers with experience using Microsoft Excel(TM) VBA or COM. In many cases, the SpreadsheetGear API is close enough to the Excel API that you can record a macro in Excel to learn which properties or methods to use in SpreadsheetGear.

Major differences between SpreadsheetGear and Excel include:

  • In most cases, SpreadsheetGear uses interfaces rather than classes. Use SpreadsheetGear.IWorkbook  instead of Microsoft.Office.Interop.Excel.Workbook.
  • SpreadsheetGear integer indexes for workbooks, worksheets, rows, columns, etc... are zero based while Excel indexes are generally one based.
  • Many formatting properties (such as IRange.Font.Color) in Excel return System.Object. This is done so that null may be returned if all of the represented cells and objects do not have the same value for the particular property. Unfortunately, this bypasses type safety at compile time and causes unnecessary complexity for the vast majority of use cases. SpreadsheetGear improves on this by returning the appropriate type (such as System.Drawing.Color), and providing a separate boolean property (such as IRange.Font.ColorDefined) which specifies whether all represented cells/objects have the same value for the property in question.
  • Enumerations leave out XL on enumeration type names and the leading xl on enumeration identifiers. Use SpreadsheetGear.SheetType.Worksheet instead of Microsoft.Office.Interop.Excel.XLSheetType.xlWorksheet.
  • Use SpreadsheetGear.IWorkbookSet in the place of Microsoft.Office.Interop.Excel.Application.
  • Since the SpreadsheetGear namespace does not have any notion of a window, properties which are set via Excel's Window object must be handled differently than they are in Excel. The SpreadsheetGear.IWorkbookWindowInfo and SpreadsheetGear.IWorksheetWindowInfo interfaces provide access to these properties.
  • When using the SpreadsheetGear Windows Forms Controls with interruptible background calculation enabled, GetLock and ReleaseLock must be used. See the Introduction for more information.
  • When the SpreadsheetGear Help is installed, Visual Studio's IntelliSense and Dynamic Help provide context sensitive help which simplifies development.
Copyright © 2003-2009 SpreadsheetGear LLC. All Rights Reserved.Help Powered by Innovasys   
SpreadsheetGear is a registered trademark of SpreadsheetGear LLC.
Microsoft, Microsoft Excel and Visual Studio are trademarks or registered trademarks of Microsoft Corporation.