ComponentOne Excel for .NET
In This Topic
    Workbook
    In This Topic

    A workbook is a spreadsheet document that comprises one or more worksheets. Excel for .NET provides all the necessary properties and methods required to create a workbook, perform complex operations on the data residing in the spreadsheets. The following sections discuss various operations that can be performed on workbooks.

    Create a Workbook

    In Excel, you can create a new workbook by simply adding a C1XLBook component to your form at design time. Alternatively, you can create an object of the C1XLBook class to create a new workbook in code as showcased in the following code.

    C#
    Copy Code
    //create a new workbook
    C1XLBook c1XLBook1 = new C1XLBook();
    

    Set Author

    Author refers to the name of the person or company that created a certain document. With Excel, you can easily set the name of the author using Author property of the C1XLBook class as demonstrated in the following code. In this example, we set the author of c1XLBook1 to "GC".

    C#
    Copy Code
    //set author
    c1XLBook1.Author = "GC";