Spread Windows Forms 17
Spread Windows Forms 17.0 Product Documentation / Developer's Guide / Storing Excel Summary and View
In This Topic
    Storing Excel Summary and View
    In This Topic

    Storing Excel Summary and ViewYou can store and display the essential information for the workbook using the Properties dialog. The following tabs can be used to accomplish this task:

    Summary and Contents tabs in Workbook Prpeorties dialog

    Using the Spread Designer

    In order to access the DocumentProperties dialog through Spread Designer, you can select the Properties option available in the File Menu.

    Using Code

    This example code shows how to use a Document Properties Form to store the summary and review information.

    C#
    Copy Code
    //Get Workbook from fpSpread1
    GrapeCity.Spreadsheet.Workbook workbook = fpSpread1.AsWorkbook();
    //Call the DocumentPropertiesForm
    FarPoint.Win.Spread.DocumentPropertiesForm form = new FarPoint.Win.Spread.DocumentPropertiesForm(workbook);
    form.Show();
    
    VB
    Copy Code
    'Get Workbook from fpSpread1
    Dim workbook As GrapeCity.Spreadsheet.Workbook = fpSpread1.AsWorkbook()
    'Call the DocumentPropertiesForm
    Dim form As FarPoint.Win.Spread.DocumentPropertiesForm = New FarPoint.Win.Spread.DocumentPropertiesForm(workbook)
    form.Show()
    

    The DocumentProperties property in the FpSpread class represents all the properties of the spread document that can be get or set by the users.

    Using Code

    This example code shows how to store the Excel summary and review information using DocumentProperties property.

    C#
    Copy Code
    //Set the view type for the sheetview
    fpSpread1.Sheets[0].View = GrapeCity.Spreadsheet.SheetViewType.PageLayout;
    //Set the Excel summary properties using Spread's "DocumentProperties" API
    fpSpread1.DocumentProperties.Title = "Spread Mescius";
    fpSpread1.DocumentProperties.Creator = "Mescius";
    fpSpread1.DocumentProperties.Version = "12.0.0.0";
    fpSpread1.DocumentProperties.Description = "Test values for Excel summary";
    fpSpread1.DocumentProperties.Application = "Test Application";
    
    VB
    Copy Code
    'Set the view type for the sheetview
    fpSpread1.Sheets(0).View = GrapeCity.Spreadsheet.SheetViewType.PageLayout
    'Set the Excel summary properties using Spread's "DocumentProperties" API
    fpSpread1.DocumentProperties.Title = "Spread Mescius"
    fpSpread1.DocumentProperties.Creator = "Mescius"
    fpSpread1.DocumentProperties.Version = "12.0.0.0"
    fpSpread1.DocumentProperties.Description = "Test values for Excel summary"
    fpSpread1.DocumentProperties.Application = "Test Application"
    
    See Also