Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/Data/CodeExamples/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/Data/CodeExamples/TableActions.cs

using System;
using System.Drawing;
using DevExpress.Spreadsheet;
using System.Collections.Generic;
using Formatting = DevExpress.Spreadsheet.Formatting;

namespace SpreadsheetExamples {
    public static class TableActions {

        static void CreateListObject(IWorkbook workbook) {
            #region #CreateTable

            Worksheet worksheet = workbook.Worksheets[0];
            Table table = worksheet.Tables.Add(worksheet["A1:F12"], false);
            table.Style = workbook.TableStyles[BuiltInTableStyleId.TableStyleMedium2];
            table.ShowTotals = true;
            table.Columns[0].TotalsRowLabel = "Total";
            table.Columns[table.Columns.Count - 1].TotalsCalculation = TotalsCalculation.Sum;

            #endregion #CreateTable
        }
    }
}