<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.BasicSalesReport" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            #region theme
            //create a custom theme.
            Themes themes = new Themes();
            ITheme theme = themes.Add("testTheme");
            theme.ThemeColorScheme[ThemeColor.Light1].RGB = Color.FromRGB(255, 255, 255);
            theme.ThemeColorScheme[ThemeColor.Dark1].RGB = Color.FromRGB(0, 0, 0);
            theme.ThemeColorScheme[ThemeColor.Light2].RGB = Color.FromRGB(255, 255, 255);
            theme.ThemeColorScheme[ThemeColor.Dark2].RGB = Color.FromRGB(0, 0, 0);
            theme.ThemeColorScheme[ThemeColor.Accent1].RGB = Color.FromRGB(140, 198, 63);
            theme.ThemeColorScheme[ThemeColor.Accent2].RGB = Color.FromRGB(242, 116, 45);
            theme.ThemeColorScheme[ThemeColor.Accent3].RGB = Color.FromRGB(106, 159, 207);
            theme.ThemeColorScheme[ThemeColor.Accent4].RGB = Color.FromRGB(242, 192, 45);
            theme.ThemeColorScheme[ThemeColor.Accent5].RGB = Color.FromRGB(146, 98, 174);
            theme.ThemeColorScheme[ThemeColor.Accent6].RGB = Color.FromRGB(121, 198, 199);
            theme.ThemeColorScheme[ThemeColor.Hyperlink].RGB = Color.FromRGB(106, 159, 207);
            theme.ThemeColorScheme[ThemeColor.FollowedHyperlink].RGB = Color.FromRGB(146, 98, 74);
            theme.ThemeFontScheme.Major[FontLanguageIndex.Latin].Name = "Garamond";
            theme.ThemeFontScheme.Minor[FontLanguageIndex.Latin].Name = "Euphemia";

            //assign the custom theme for workbook.
            workbook.Theme = theme;
            #endregion

            #region NameStyle
            //Change built-in custom styles.
            var style_Title = workbook.Styles["Title"];
            style_Title.Font.ThemeFont = ThemeFont.Major;
            style_Title.Font.Size = 26;
            style_Title.Font.Bold = true;
            style_Title.Font.ThemeColor = ThemeColor.Light1;
            style_Title.IncludeAlignment = false;
            style_Title.IncludeFont = true;
            style_Title.IncludeBorder = false;
            style_Title.IncludeNumber = false;
            style_Title.IncludePatterns = false;
            style_Title.IncludeProtection = false;

            var style_Normal = workbook.Styles["Normal"];
            style_Normal.HorizontalAlignment = HorizontalAlignment.General;
            style_Normal.VerticalAlignment = VerticalAlignment.Center;
            style_Normal.Font.ThemeFont = ThemeFont.Minor;
            style_Normal.Font.Size = 9;
            style_Normal.Font.ThemeColor = ThemeColor.Dark1;
            style_Normal.IncludeAlignment = true;
            style_Normal.IncludeFont = true;
            style_Normal.IncludeBorder = true;
            style_Normal.IncludeNumber = true;
            style_Normal.IncludePatterns = true;
            style_Normal.IncludeProtection = true;
            #endregion

            #region Worksheet_DataInput
            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Name = "Data Input";
            //hide worksheet gridlines.
            worksheet.SheetView.DisplayGridlines = false;

            #region RowHeightColumnWidth
            worksheet.StandardHeight = 18.75;
            worksheet.StandardWidth = 8.43;

            worksheet.Range["1:1"].RowHeight = 51.75;
            worksheet.Range["2:2"].RowHeight = 20.25;
            worksheet.Range["3:87"].RowHeight = 19;

            worksheet.Range["A:A"].ColumnWidth = 2.28515625;
            worksheet.Range["B:B"].ColumnWidth = 16.85546875;
            worksheet.Range["C:C"].ColumnWidth = 20.5703125;
            worksheet.Range["D:D"].ColumnWidth = 27.7109375;
            worksheet.Range["E:E"].ColumnWidth = 17.7109375;
            worksheet.Range["F:F"].ColumnWidth = 18.140625;
            worksheet.Range["G:G"].ColumnWidth = 2.28515625;
            #endregion

            #region Values
            worksheet.Range["B1"].Value = "DATA INPUT";
            #endregion

            #region Table
            worksheet.Range["B2:F87"].Value = new object[,] {
                    { "DATE", "PRODUCT", "CUSTOMER", "AMOUNT", "QUARTER" },
                    { new DateTime(2012, 1, 1), "Product 14", "Fabrikam, Inc.", 1886, "QUARTER 1" },
                    { new DateTime(2012, 1, 3), "Product 23", "Alpine Ski House", 4022, "QUARTER 1" },
                    { new DateTime(2012, 1, 4), "Product 18", "Coho Winery", 8144, "QUARTER 1" },
                    { new DateTime(2012, 1, 7), "Product 10", "Southridge Video", 8002, "QUARTER 1" },
                    { new DateTime(2012, 1, 11), "Product 7", "Coho Winery", 6392, "QUARTER 1" },
                    { new DateTime(2012, 1, 25), "Product 1", "Contoso, Ltd", 6444, "QUARTER 1" },
                    { new DateTime(2012, 1, 30), "Product 27", "Southridge Video", 2772, "QUARTER 1" },
                    { new DateTime(2012, 2, 4), "Product 30", "City Power &amp; Light", 8674, "QUARTER 1" },
                    { new DateTime(2012, 2, 5), "Product 16", "A. Datum Corporation", 2332, "QUARTER 1" },
                    { new DateTime(2012, 2, 8), "Product 21", "Alpine Ski House", 5370, "QUARTER 1" },
                    { new DateTime(2012, 2, 10), "Product 6", "City Power &amp; Light", 1768, "QUARTER 1" },
                    { new DateTime(2012, 2, 17), "Product 24", "Coho Winery", 5474, "QUARTER 1" },
                    { new DateTime(2012, 2, 22), "Product 28", "Fabrikam, Inc.", 3494, "QUARTER 1" },
                    { new DateTime(2012, 2, 24), "Product 22", "City Power &amp; Light", 1484, "QUARTER 1" },
                    { new DateTime(2012, 2, 29), "Product 26", "Humongous Insurance", 5454, "QUARTER 1" },
                    { new DateTime(2012, 3, 1), "Product 15", "City Power &amp; Light", 2306, "QUARTER 1" },
                    { new DateTime(2012, 3, 8), "Product 9", "A. Datum Corporation", 8652, "QUARTER 1" },
                    { new DateTime(2012, 3, 14), "Product 16", "Alpine Ski House", 3594, "QUARTER 1" },
                    { new DateTime(2012, 3, 31), "Product 28", "City Power &amp; Light", 9130, "QUARTER 1" },
                    { new DateTime(2012, 4, 3), "Product 28", "Southridge Video", 9986, "QUARTER 2" },
                    { new DateTime(2012, 4, 9), "Product 2", "Fabrikam, Inc.", 8270, "QUARTER 2" },
                    { new DateTime(2012, 4, 10), "Product 30", "A. Datum Corporation", 5184, "QUARTER 2" },
                    { new DateTime(2012, 4, 11), "Product 25", "Contoso, Ltd", 9426, "QUARTER 2" },
                    { new DateTime(2012, 4, 11), "Product 15", "Humongous Insurance", 4012, "QUARTER 2" },
                    { new DateTime(2012, 4, 15), "Product 28", "Coho Winery", 7724, "QUARTER 2" },
                    { new DateTime(2012, 5, 3), "Product 21", "Northwind Traders", 2264, "QUARTER 2" },
                    { new DateTime(2012, 5, 4), "Product 30", "Coho Winery", 9374, "QUARTER 2" },
                    { new DateTime(2012, 5, 5), "Product 17", "Humongous Insurance", 3692, "QUARTER 2" },
                    { new DateTime(2012, 5, 5), "Product 28", "Humongous Insurance", 9124, "QUARTER 2" },
                    { new DateTime(2012, 5, 19), "Product 22", "Humongous Insurance", 4962, "QUARTER 2" },
                    { new DateTime(2012, 5, 22), "Product 8", "A. Datum Corporation", 9166, "QUARTER 2" },
                    { new DateTime(2012, 5, 31), "Product 16", "Coho Winery", 5610, "QUARTER 2" },
                    { new DateTime(2012, 6, 2), "Product 8", "City Power &amp; Light", 3322, "QUARTER 2" },
                    { new DateTime(2012, 6, 2), "Product 3", "Humongous Insurance", 2592, "QUARTER 2" },
                    { new DateTime(2012, 6, 4), "Product 13", "Contoso, Ltd", 4444, "QUARTER 2" },
                    { new DateTime(2012, 6, 9), "Product 10", "Southridge Video", 7166, "QUARTER 2" },
                    { new DateTime(2012, 6, 12), "Product 13", "Fabrikam, Inc.", 5008, "QUARTER 3" },
                    { new DateTime(2012, 6, 26), "Product 2", "Contoso, Ltd", 3578, "QUARTER 3" },
                    { new DateTime(2012, 6, 29), "Product 22", "Southridge Video", 1144, "QUARTER 3" },
                    { new DateTime(2012, 7, 2), "Product 14", "Alpine Ski House", 3696, "QUARTER 3" },
                    { new DateTime(2012, 7, 6), "Product 14", "Coho Winery", 7084, "QUARTER 3" },
                    { new DateTime(2012, 7, 6), "Product 2", "City Power &amp; Light", 4642, "QUARTER 3" },
                    { new DateTime(2012, 7, 8), "Product 5", "Fabrikam, Inc.", 6078, "QUARTER 3" },
                    { new DateTime(2012, 7, 10), "Product 9", "Alpine Ski House", 2394, "QUARTER 3" },
                    { new DateTime(2012, 7, 15), "Product 13", "Southridge Video", 5516, "QUARTER 3" },
                    { new DateTime(2012, 7, 16), "Product 8", "Fabrikam, Inc.", 1948, "QUARTER 3" },
                    { new DateTime(2012, 7, 19), "Product 28", "Contoso, Ltd", 7280, "QUARTER 3" },
                    { new DateTime(2012, 7, 29), "Product 26", "A. Datum Corporation", 9292, "QUARTER 3" },
                    { new DateTime(2012, 8, 19), "Product 26", "Fabrikam, Inc.", 5868, "QUARTER 3" },
                    { new DateTime(2012, 8, 19), "Product 6", "Northwind Traders", 4098, "QUARTER 3" },
                    { new DateTime(2012, 8, 20), "Product 13", "A. Datum Corporation", 1270, "QUARTER 3" },
                    { new DateTime(2012, 8, 20), "Product 23", "A. Datum Corporation", 7744, "QUARTER 3" },
                    { new DateTime(2012, 8, 24), "Product 2", "Humongous Insurance", 5488, "QUARTER 3" },
                    { new DateTime(2012, 8, 24), "Product 5", "Southridge Video", 6944, "QUARTER 3" },
                    { new DateTime(2012, 8, 25), "Product 20", "Fabrikam, Inc.", 4454, "QUARTER 3" },
                    { new DateTime(2012, 8, 27), "Product 13", "City Power &amp; Light", 7100, "QUARTER 3" },
                    { new DateTime(2012, 8, 30), "Product 8", "Humongous Insurance", 4346, "QUARTER 3" },
                    { new DateTime(2012, 9, 1), "Product 25", "Alpine Ski House", 2032, "QUARTER 3" },
                    { new DateTime(2012, 9, 17), "Product 20", "Contoso, Ltd", 2328, "QUARTER 3" },
                    { new DateTime(2012, 9, 22), "Product 18", "Humongous Insurance", 6090, "QUARTER 3" },
                    { new DateTime(2012, 9, 25), "Product 19", "Coho Winery", 8344, "QUARTER 3" },
                    { new DateTime(2012, 9, 29), "Product 11", "Alpine Ski House", 5872, "QUARTER 3" },
                    { new DateTime(2012, 9, 30), "Product 25", "Humongous Insurance", 1578, "QUARTER 3" },
                    { new DateTime(2012, 10, 2), "Product 29", "City Power &amp; Light", 1714, "QUARTER 4" },
                    { new DateTime(2012, 10, 5), "Product 11", "Fabrikam, Inc.", 5716, "QUARTER 4" },
                    { new DateTime(2012, 10, 6), "Product 21", "Coho Winery", 8244, "QUARTER 4" },
                    { new DateTime(2012, 10, 14), "Product 11", "A. Datum Corporation", 8888, "QUARTER 4" },
                    { new DateTime(2012, 10, 14), "Product 23", "City Power &amp; Light", 9438, "QUARTER 4" },
                    { new DateTime(2012, 11, 9), "Product 14", "Southridge Video", 6230, "QUARTER 4" },
                    { new DateTime(2012, 11, 13), "Product 17", "A. Datum Corporation", 4278, "QUARTER 4" },
                    { new DateTime(2012, 11, 17), "Product 6", "Alpine Ski House", 5438, "QUARTER 4" },
                    { new DateTime(2012, 11, 22), "Product 1", "Coho Winery", 6728, "QUARTER 4" },
                    { new DateTime(2012, 11, 25), "Product 30", "Fabrikam, Inc.", 9992, "QUARTER 4" },
                    { new DateTime(2012, 11, 25), "Product 26", "Northwind Traders", 8462, "QUARTER 4" },
                    { new DateTime(2012, 11, 27), "Product 11", "Contoso, Ltd", 7930, "QUARTER 4" },
                    { new DateTime(2012, 11, 30), "Product 30", "Northwind Traders", 8136, "QUARTER 4" },
                    { new DateTime(2012, 12, 2), "Product 13", "Humongous Insurance", 6212, "QUARTER 4" },
                    { new DateTime(2012, 12, 5), "Product 3", "Contoso, Ltd", 4946, "QUARTER 4" },
                    { new DateTime(2012, 12, 5), "Product 3", "Southridge Video", 8554, "QUARTER 4" },
                    { new DateTime(2012, 12, 10), "Product 24", "Northwind Traders", 4508, "QUARTER 4" },
                    { new DateTime(2012, 12, 21), "Product 7", "Humongous Insurance", 7300, "QUARTER 4" },
                    { new DateTime(2012, 12, 24), "Product 17", "Fabrikam, Inc.", 8292, "QUARTER 4" },
                    { new DateTime(2012, 12, 26), "Product 26", "Alpine Ski House", 9782, "QUARTER 4" },
                    { new DateTime(2013, 1, 3), "Product 19", "Fabrikam, Inc.", 8024, "QUARTER 1" },
                    { new DateTime(2013, 1, 4), "Product 22", "A. Datum Corporation", 3758, "QUARTER 1" },
                };

            ITable table_Data = worksheet.Tables.Add(worksheet.Range["B2:F87"], true);

            //set built-in table style for table.
            table_Data.TableStyle = workbook.TableStyles["TableStyleMedium2"];

            //customize table header range's style.
            table_Data.HeaderRange.HorizontalAlignment = HorizontalAlignment.Left;
            table_Data.HeaderRange.IndentLevel = 1;
            table_Data.HeaderRange.VerticalAlignment = VerticalAlignment.Center;
            table_Data.HeaderRange.Font.Size = 11;

            //customize table each column's data body range's style.
            table_Data.Columns[0].DataBodyRange.HorizontalAlignment = HorizontalAlignment.Left;
            table_Data.Columns[0].DataBodyRange.IndentLevel = 1;
            table_Data.Columns[0].DataBodyRange.VerticalAlignment = VerticalAlignment.Center;
            table_Data.Columns[1].DataBodyRange.HorizontalAlignment = HorizontalAlignment.Left;
            table_Data.Columns[1].DataBodyRange.IndentLevel = 1;
            table_Data.Columns[1].DataBodyRange.VerticalAlignment = VerticalAlignment.Center;
            table_Data.Columns[2].DataBodyRange.HorizontalAlignment = HorizontalAlignment.Left;
            table_Data.Columns[2].DataBodyRange.IndentLevel = 1;
            table_Data.Columns[2].DataBodyRange.VerticalAlignment = VerticalAlignment.Center;
            table_Data.Columns[3].DataBodyRange.HorizontalAlignment = HorizontalAlignment.Right;
            table_Data.Columns[3].DataBodyRange.IndentLevel = 1;
            table_Data.Columns[3].DataBodyRange.VerticalAlignment = VerticalAlignment.Bottom;
            table_Data.Columns[3].DataBodyRange.NumberFormat = "$#,##0.00";
            table_Data.Columns[4].DataBodyRange.HorizontalAlignment = HorizontalAlignment.Left;
            table_Data.Columns[4].DataBodyRange.IndentLevel = 1;
            table_Data.Columns[4].DataBodyRange.VerticalAlignment = VerticalAlignment.Bottom;
            #endregion

            #region Slicers
            //create slicer caches.
            ISlicerCache cache_customer = workbook.SlicerCaches.Add(table_Data, "CUSTOMER", "CUSTOMER");
            ISlicerCache cache_product = workbook.SlicerCaches.Add(table_Data, "PRODUCT", "PRODUCT");

            //create slicers.
            ISlicer slicer_customer = cache_customer.Slicers.Add(worksheet, "CUSTOMER", "CUSTOMER", 51.914015748031495, 551, 144, 190);
            ISlicer slicer_product = cache_product.Slicers.Add(worksheet, "PRODUCT", "PRODUCT", 51.914015748031495, 691, 144, 190);

            //assign built-in slicer style for slicers.
            slicer_customer.Style = workbook.TableStyles["SlicerStyleDark1"];
            slicer_product.Style = workbook.TableStyles["SlicerStyleDark1"];
            #endregion

            #region Style
            worksheet.Range["1:1"].Style = workbook.Styles["Title"];
            worksheet.Range["1:1"].Interior.ThemeColor = ThemeColor.Accent1;
            worksheet.Range["1:1"].HorizontalAlignment = HorizontalAlignment.Left;
            worksheet.Range["1:1"].IndentLevel = 1;
            worksheet.Range["1:1"].VerticalAlignment = VerticalAlignment.Center;
            worksheet.Range["A1"].Style = workbook.Styles["Normal"];
        
            #endregion

            #endregion

            #region Worksheet_CustomizableReport
            IWorksheet worksheet2 = workbook.Worksheets.Add();
            worksheet2.Name = "Customizable Report";
            worksheet2.SheetView.DisplayGridlines = false;

            #region RowHeightColumnWidth
            worksheet2.StandardHeight = 16.5;
            worksheet2.StandardWidth = 8.43;
            worksheet2.Range["1:1"].RowHeight = 51.75;
            worksheet2.Range["2:116"].RowHeight = 14.25;
            worksheet2.Range["A:A"].ColumnWidth = 2.28515625;
            worksheet2.Range["B:B"].ColumnWidth = 23.140625;
            worksheet2.Range["C:C"].ColumnWidth = 15.5703125;
            worksheet2.Range["D:F"].ColumnWidth = 11.42578125;
            worksheet2.Range["G:H"].ColumnWidth = 13.42578125;
            #endregion

            #region Values
            worksheet2.Range["B1"].Value = "SALES REPORT";
            #endregion

            #region PivotTable
            //create pivot cache.
            var pivotcache = workbook.PivotCaches.Create(worksheet.Range["B2:F87"]);
            //create pivot table.
            var pivottable = worksheet2.PivotTables.Add(pivotcache, worksheet2.Range["B2"], "ReportPivot");
            //assign built-in table style for pivot table.
            pivottable.TableStyle = "PivotStyleMedium2";

            //config pivot table's fields.
            var field_product = pivottable.PivotFields["PRODUCT"];
            field_product.Orientation = PivotFieldOrientation.RowField;

            var field_customer = pivottable.PivotFields["CUSTOMER"];
            field_customer.Orientation = PivotFieldOrientation.RowField;

            var field_amount = pivottable.PivotFields["AMOUNT"];
            field_amount.Orientation = PivotFieldOrientation.DataField;

            var field_quarter = pivottable.PivotFields["QUARTER"];
            field_quarter.Orientation = PivotFieldOrientation.ColumnField;

            //just a workaround, we dost not provide api to set number format
            //for pivot field. so use follow way.
            pivottable.DataBodyRange.NumberFormat = "$#,##0.00_);($#,##0.00)";
            #endregion

            #region Style
            worksheet2.Range["1:1"].Style = workbook.Styles["Title"];
            worksheet2.Range["1:1"].Interior.ThemeColor = ThemeColor.Accent1;
            worksheet2.Range["1:1"].HorizontalAlignment = HorizontalAlignment.Left;
            worksheet2.Range["1:1"].IndentLevel = 1;
            worksheet2.Range["1:1"].VerticalAlignment = VerticalAlignment.Center;
            worksheet2.Range["A1"].Style = workbook.Styles["Normal"];
            #endregion

            #region Shape
            //create a shape.
            IShape shape = worksheet2.Shapes.AddShape(AutoShapeType.RectangularCallout, 472, 65, 300, 70);
            //config shape's line and fill.
            shape.Line.DashStyle = LineDashStyle.Solid;
            shape.Line.Weight = 4;
            shape.Line.Color.RGB = Color.FromRGB(89, 89, 89);
            shape.Fill.Solid();
            shape.Fill.Color.ColorType = SolidColorType.None;

            //config shape's rich text.
            ITextRange shape_p1 = shape.TextFrame.TextRange.Paragraphs[0];
            shape_p1.Text = "TIP:";
            ITextRange shape_p2 = shape.TextFrame.TextRange.Paragraphs.Add();
            shape_p2.Text = "Customize this PivotTable to fit your needs! Select a cell in the PivotTable to activate the PivotTable Field List pane. Then in the task pane, drag to add, remove, or reorder the fields." + 
                " For example, drag the Product field above the Customer field for a different view. To update PivotTable data, right-click in the PivotTable and then click Refresh.";

            //set first paragraph's font style.
            shape_p1.Font.ThemeFont = ThemeFont.Major;
            shape_p1.Font.Bold = true;
            shape_p1.Font.Size = 12;
            shape_p1.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            shape_p1.Font.Color.Brightness = 0.25;

            //set second paragraph's font style.
            shape_p2.Font.ThemeFont = ThemeFont.Minor;
            shape_p2.Font.Size = 8;
            shape_p2.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            shape_p2.Font.Color.Brightness = 0.25;
            #endregion

            #endregion

            #region Worksheet_DataLists
            IWorksheet worksheet3 = workbook.Worksheets.Add();
            worksheet3.Name = "Data Lists";
            worksheet3.SheetView.DisplayGridlines = false;

            #region RowHeightColumnWidth
            worksheet3.StandardHeight = 18.75;
            worksheet3.StandardWidth = 8.43;
            worksheet3.Range["1:1"].RowHeight = 51.75;
            worksheet3.Range["2:32"].RowHeight = 19;
            worksheet3.Range["A:A, D:D"].ColumnWidth = 2.28515625;
            worksheet3.Range["B:C"].ColumnWidth = 34.42578125;
            #endregion

            #region Values
            worksheet3.Range["B1"].Value = "DATA LISTS";
            #endregion

            #region Table
            worksheet3.Range["B2:B32"].Value = new object[,] {
                    { "PRODUCTS" },
                    { "Product 1" },
                    { "Product 2" },
                    { "Product 3" },
                    { "Product 4" },
                    { "Product 5" },
                    { "Product 6" },
                    { "Product 7" },
                    { "Product 8" },
                    { "Product 9" },
                    { "Product 10" },
                    { "Product 11" },
                    { "Product 12" },
                    { "Product 13" },
                    { "Product 14" },
                    { "Product 15" },
                    { "Product 16" },
                    { "Product 17" },
                    { "Product 18" },
                    { "Product 19" },
                    { "Product 20" },
                    { "Product 21" },
                    { "Product 22" },
                    { "Product 23" },
                    { "Product 24" },
                    { "Product 25" },
                    { "Product 26" },
                    { "Product 27" },
                    { "Product 28" },
                    { "Product 29" },
                    { "Product 30" },
                };
            ITable table_Products = worksheet3.Tables.Add(worksheet.Range["B2:B32"], true);
            worksheet3.Range["C2:C30"].Value = new object[,] {
                    { "CUSTOMERS" },
                    { "A. Datum Corporation" },
                    { "Adventure Works" },
                    { "Alpine Ski House" },
                    { "Blue Yonder Airlines" },
                    { "City Power &amp; Light" },
                    { "Coho Vineyard" },
                    { "Coho Winery" },
                    { "Coho Vineyard &amp; Winery" },
                    { "Contoso, Ltd" },
                    { "Contoso Pharmaceuticals" },
                    { "Consolidated Messenger" },
                    { "Fabrikam, Inc." },
                    { "Fourth Coffee" },
                    { "Graphic Design Institute" },
                    { "Humongous Insurance" },
                    { "Litware, Inc." },
                    { "Lucerne Publishing" },
                    { "Margie's Travel" },
                    { "Northwind Traders" },
                    { "Proseware, Inc." },
                    { "School of Fine Art" },
                    { "Southridge Video" },
                    { "Tailspin Toys" },
                    { "Trey Research" },
                    { "The Phone Company" },
                    { "Wide World Importers" },
                    { "Wingtip Toys" },
                    { "Woodgrove Bank" },
                };
            ITable table_Customers = worksheet3.Tables.Add(worksheet.Range["C2:C30"], true);

            table_Products.TableStyle = workbook.TableStyles["TableStyleMedium2"];
            table_Products.Columns[0].Range.HorizontalAlignment = HorizontalAlignment.Left;
            table_Products.Columns[0].Range.IndentLevel = 1;
            table_Products.Columns[0].Range.VerticalAlignment = VerticalAlignment.Center;
            table_Products.HeaderRange.Font.Size = 11;

            table_Customers.TableStyle = workbook.TableStyles["TableStyleMedium2"];
            table_Customers.Columns[0].Range.HorizontalAlignment = HorizontalAlignment.Left;
            table_Customers.Columns[0].Range.IndentLevel = 1;
            table_Customers.Columns[0].Range.VerticalAlignment = VerticalAlignment.Center;
            table_Customers.ShowTableStyleFirstColumn = true;
            table_Customers.HeaderRange.Font.Size = 11;
            #endregion

            #region Style
            worksheet3.Range["1:1"].Style = workbook.Styles["Title"];
            worksheet3.Range["1:1"].Interior.ThemeColor = ThemeColor.Accent1;
            worksheet3.Range["1:1"].HorizontalAlignment = HorizontalAlignment.Left;
            worksheet3.Range["1:1"].IndentLevel = 1;
            worksheet3.Range["1:1"].VerticalAlignment = VerticalAlignment.Center;
            worksheet3.Range["A1"].Style = workbook.Styles["Normal"];
            #endregion

            #region Shape
            IShape shape2 = worksheet3.Shapes.AddShape(AutoShapeType.RectangularCallout, 380, 65, 280, 50);
            shape2.Line.DashStyle = LineDashStyle.Solid;
            shape2.Line.Weight = 4;
            shape2.Line.Color.RGB = Color.FromRGB(89, 89, 89);
            shape2.Fill.Solid();
            shape2.Fill.Color.ColorType = SolidColorType.None;

            ITextRange shape2_p1 = shape2.TextFrame.TextRange.Paragraphs[0];
            shape2_p1.Text = "TIP:";
            ITextRange shape2_p2 = shape2.TextFrame.TextRange.Paragraphs.Add();
            shape2_p2.Text = "To add a new product or customer, start typing below the table and it will automatically expand when you press the Enter or Tab key.";
            shape2_p1.Font.ThemeFont = ThemeFont.Major;
            shape2_p1.Font.Bold = true;
            shape2_p1.Font.Size = 12;
            shape2_p1.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            shape2_p1.Font.Color.Brightness = 0.25;

            shape2_p2.Font.ThemeFont = ThemeFont.Minor;
            shape2_p2.Font.Size = 8;
            shape2_p2.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            shape2_p2.Font.Color.Brightness = 0.25;
            #endregion

            #endregion

           //save to an excel file
   workbook.Save("BasicSalesReport.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.BidTracker" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];


            //***********************Set RowHeight &amp; ColumnWidth***************
            worksheet.StandardHeight = 30;
            worksheet.Range["1:1"].RowHeight = 57.75;
            worksheet.Range["2:9"].RowHeight = 30.25;
            worksheet.Range["A:A"].ColumnWidth = 2.71;
            worksheet.Range["B:B"].ColumnWidth = 11.71;
            worksheet.Range["C:C"].ColumnWidth = 28;
            worksheet.Range["D:D"].ColumnWidth = 22.425;
            worksheet.Range["E:E"].ColumnWidth = 16.71;
            worksheet.Range["F:F"].ColumnWidth = 28;
            worksheet.Range["G:H"].ColumnWidth = 16.71;
            worksheet.Range["I:I"].ColumnWidth = 2.71;



            //**************************Set Table Value &amp; Formulas*********************
            ITable table = worksheet.Tables.Add(worksheet.Range["B2:H9"], true);
            worksheet.Range["B2:H9"].Value = new object[,]
            {
                { "BID #", "DESCRIPTION", "DATE RECEIVED", "AMOUNT", "PERCENT COMPLETE", "DEADLINE", "DAYS LEFT" },
                { 1, "Bid number 1", null, 2000, 0.5, null, null },
                { 2, "Bid number 2", null, 3500, 0.25, null, null },
                { 3, "Bid number 3", null, 5000, 0.3, null, null },
                { 4, "Bid number 4", null, 4000, 0.2, null, null },
                { 5, "Bid number 5", null, 4000, 0.75, null , null },
                { 6, "Bid number 6", null, 1500, 0.45, null , null },
                { 7, "Bid number 7", null, 5000, 0.65, null, null },
            };
            worksheet.Range["B1"].Value = "Bid Details";
            worksheet.Range["D3"].Formula = "=TODAY()-10";
            worksheet.Range["D4:D5"].Formula = "=TODAY()-20";
            worksheet.Range["D6"].Formula = "=TODAY()-10";
            worksheet.Range["D7"].Formula = "=TODAY()-28";
            worksheet.Range["D8"].Formula = "=TODAY()-17";
            worksheet.Range["D9"].Formula = "=TODAY()-15";
            worksheet.Range["G3:G9"].Formula = "=[@[DATE RECEIVED]]+30";
            worksheet.Range["H3:H9"].Formula = "=[@DEADLINE]-TODAY()";



            //****************************Set Table Style********************************
            ITableStyle tableStyle = workbook.TableStyles.Add("Bid Tracker");
            workbook.DefaultTableStyle = "Bid Tracker";

            //Set WholeTable element style.
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Font.Color = Color.FromRGB(89, 89, 89);
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders.Color = Color.FromRGB(89, 89, 89);
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideVertical].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Thin;

            //Set HeaderRow element style.
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders.Color = Color.FromRGB(89, 89, 89);
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.InsideVertical].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Interior.Color = Color.FromRGB(131, 95, 1);
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Interior.PatternColor = Color.FromRGB(254, 184, 10);


            //Set TotalRow element style.
            tableStyle.TableStyleElements[TableStyleElementType.TotalRow].Borders.Color = Color.White;
            tableStyle.TableStyleElements[TableStyleElementType.TotalRow].Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.TotalRow].Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.TotalRow].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.TotalRow].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.TotalRow].Borders[BordersIndex.InsideVertical].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.TotalRow].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.TotalRow].Interior.Color = Color.FromRGB(131, 95, 1);



            //***********************************Set Named Styles*****************************
            IStyle titleStyle = workbook.Styles["Title"];
            titleStyle.Font.Name = "Calibri";
            titleStyle.Font.Size = 36;
            titleStyle.Font.Color = Color.FromRGB(56, 145, 167);
            titleStyle.IncludeAlignment = true;
            titleStyle.VerticalAlignment = VerticalAlignment.Center;


            IStyle heading1Style = workbook.Styles["Heading 1"];
            heading1Style.IncludeAlignment = true;
            heading1Style.HorizontalAlignment = HorizontalAlignment.Left;
            heading1Style.IndentLevel = 1;
            heading1Style.VerticalAlignment = VerticalAlignment.Bottom;
            heading1Style.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            heading1Style.Font.Size = 14;
            heading1Style.Font.Color = Color.White;
            heading1Style.Font.Bold = false;
            heading1Style.IncludePatterns = true;
            heading1Style.Interior.Color = Color.FromRGB(131, 95, 1);


            IStyle dateStyle = workbook.Styles.Add("Date");
            dateStyle.IncludeNumber = true;
            dateStyle.NumberFormat = "m/d/yyyy";
            dateStyle.IncludeAlignment = true;
            dateStyle.HorizontalAlignment = HorizontalAlignment.Left;
            dateStyle.IndentLevel = 1;
            dateStyle.VerticalAlignment = VerticalAlignment.Center;
            dateStyle.IncludeFont = false;
            dateStyle.IncludeBorder = false;
            dateStyle.IncludePatterns = false;


            IStyle commaStyle = workbook.Styles["Comma"];
            commaStyle.IncludeNumber = true;
            commaStyle.NumberFormat = "#,##0_);(#,##0)";
            commaStyle.IncludeAlignment = true;
            commaStyle.HorizontalAlignment = HorizontalAlignment.Left;
            commaStyle.IndentLevel = 1;
            commaStyle.VerticalAlignment = VerticalAlignment.Center;


            IStyle normalStyle = workbook.Styles["Normal"];
            normalStyle.HorizontalAlignment = HorizontalAlignment.Left;
            normalStyle.IndentLevel = 1;
            normalStyle.VerticalAlignment = VerticalAlignment.Center;
            normalStyle.WrapText = true;
            normalStyle.Font.Color = Color.FromRGB(89, 89, 89);


            IStyle currencyStyle = workbook.Styles["Currency"];
            currencyStyle.NumberFormat = "$#,##0.00";
            currencyStyle.IncludeAlignment = true;
            currencyStyle.HorizontalAlignment = HorizontalAlignment.Left;
            currencyStyle.IndentLevel = 1;
            currencyStyle.VerticalAlignment = VerticalAlignment.Center;


            IStyle percentStyle = workbook.Styles["Percent"];
            percentStyle.IncludeAlignment = true;
            percentStyle.HorizontalAlignment = HorizontalAlignment.Right;
            percentStyle.VerticalAlignment = VerticalAlignment.Center;
            percentStyle.IncludeFont = true;
            percentStyle.Font.Name = "Calibri";
            percentStyle.Font.Size = 20;
            percentStyle.Font.Bold = true;
            percentStyle.Font.Color = Color.FromRGB(89, 89, 89);


            IStyle comma0Style = workbook.Styles["Comma [0]"];
            comma0Style.NumberFormat = "#,##0_);(#,##0)";
            comma0Style.IncludeAlignment = true;
            comma0Style.HorizontalAlignment = HorizontalAlignment.Right;
            comma0Style.IndentLevel = 3;
            comma0Style.VerticalAlignment = VerticalAlignment.Center;



            //************************************Add Conditional Formatting****************
            IDataBar dataBar = worksheet.Range["F3:F9"].FormatConditions.AddDatabar();
            dataBar.MinPoint.Type = ConditionValueTypes.Number;
            dataBar.MinPoint.Value = 1;
            dataBar.MaxPoint.Type = ConditionValueTypes.Number;
            dataBar.MaxPoint.Value = 0;

            dataBar.BarFillType = DataBarFillType.Gradient;
            dataBar.BarColor.Color = Color.FromRGB(126, 194, 211);
            dataBar.Direction = DataBarDirection.Context;

            dataBar.AxisColor.Color = Color.Black;
            dataBar.AxisPosition = DataBarAxisPosition.Automatic;

            dataBar.NegativeBarFormat.ColorType = DataBarNegativeColorType.Color;
            dataBar.NegativeBarFormat.Color.Color = Color.Red;
            dataBar.ShowValue = true;



            //****************************************Use NamedStyle**************************
            worksheet.SheetView.DisplayGridlines = false;
            table.TableStyle = tableStyle;
            worksheet.Range["B1"].Style = titleStyle;
            worksheet.Range["B1"].WrapText = false;
            worksheet.Range["B2:H2"].Style = heading1Style;
            worksheet.Range["B3:B9"].Style = commaStyle;
            worksheet.Range["C3:C9"].Style = normalStyle;
            worksheet.Range["D3:D9"].Style = dateStyle;
            worksheet.Range["E3:E9"].Style = currencyStyle;
            worksheet.Range["F3:F9"].Style = percentStyle;
            worksheet.Range["G3:G9"].Style = dateStyle;
            worksheet.Range["H3:H9"].Style = comma0Style;

           //save to an excel file
   workbook.Save("BidTracker.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.BloodPressureTracker" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            #region theme
            //create a custom theme.
            Themes themes = new Themes();
            ITheme theme = themes.Add("testTheme");
            theme.ThemeColorScheme[ThemeColor.Light1].RGB = Color.FromRGB(255, 255, 255);
            theme.ThemeColorScheme[ThemeColor.Dark1].RGB = Color.FromRGB(0, 0, 0);
            theme.ThemeColorScheme[ThemeColor.Light2].RGB = Color.FromRGB(222, 222, 212);
            theme.ThemeColorScheme[ThemeColor.Dark2].RGB = Color.FromRGB(30, 46, 47);
            theme.ThemeColorScheme[ThemeColor.Accent1].RGB = Color.FromRGB(233, 117, 90);
            theme.ThemeColorScheme[ThemeColor.Accent2].RGB = Color.FromRGB(122, 182, 186);
            theme.ThemeColorScheme[ThemeColor.Accent3].RGB = Color.FromRGB(125, 181, 135);
            theme.ThemeColorScheme[ThemeColor.Accent4].RGB = Color.FromRGB(230, 191, 94);
            theme.ThemeColorScheme[ThemeColor.Accent5].RGB = Color.FromRGB(230, 143, 77);
            theme.ThemeColorScheme[ThemeColor.Accent6].RGB = Color.FromRGB(194, 107, 112);
            theme.ThemeColorScheme[ThemeColor.Hyperlink].RGB = Color.FromRGB(122, 182, 186);
            theme.ThemeColorScheme[ThemeColor.FollowedHyperlink].RGB = Color.FromRGB(166, 140, 177);
            theme.ThemeFontScheme.Major[FontLanguageIndex.Latin].Name = "Corbel";
            theme.ThemeFontScheme.Minor[FontLanguageIndex.Latin].Name = "Corbel";

            //assign the custom theme for workbook.
            workbook.Theme = theme;
            #endregion

            //does not show sheet gridlines.
            worksheet.SheetView.DisplayGridlines = false;

            #region RowHeightColumnWidth
            //set row height and column width.
            worksheet.StandardHeight = 12.75;
            worksheet.StandardWidth = 8.43;
            worksheet.Rows[1].RowHeight = 32.25;
            worksheet.Rows[2].RowHeight = 13.5;
            worksheet.Rows[3].RowHeight = 18.75;
            worksheet.Rows[6].RowHeight = 18.75;
            worksheet.Rows[9].RowHeight = 18.75;
            worksheet.Rows[12].RowHeight = 18.75;
            worksheet.Rows[15].RowHeight = 19.5;
            worksheet.Rows[16].RowHeight = 13.5;
            worksheet.Rows[33].RowHeight = 19.5;
            worksheet.Rows[34].RowHeight = 13.5;

            worksheet.Columns[0].ColumnWidth = 1.7109375;
            worksheet.Columns[1].ColumnWidth = 12.140625;
            worksheet.Columns[2].ColumnWidth = 12.140625;
            worksheet.Columns[3].ColumnWidth = 12.140625;
            worksheet.Columns[4].ColumnWidth = 11.85546875;
            worksheet.Columns[5].ColumnWidth = 12.7109375;
            worksheet.Columns[6].ColumnWidth = 13.85546875;
            worksheet.Columns[7].ColumnWidth = 44.7109375;
            #endregion

            #region Values
            //initialize worksheet's values.
            worksheet.Name = "BLOOD PRESSURE DATA";
            worksheet.Range["B2"].Value = "BLOOD PRESSURE TRACKER";
            worksheet.Range["B4:F13"].Value = new object[,] {
                                { "NAME", null, null, null, null },
                                { null, null, null, null, null },
                                { null, null, null, "Systolic", "Diastolic" },
                                { "TARGET BLOOD PRESSURE", null, null, 120, 80 },
                                { null, null, null, null, null },
                                { null, null, null, "Systolic", "Diastolic" },
                                { "CALL PHYSICIAN IF ABOVE", null, null, 140, 90 },
                                { null, null, null, null, null },
                                { null, null, null, null, null },
                                { "PHYSICIAN PHONE NUMBER", null, null, "[Phone Number]", null}
                            };

            worksheet.Range["B16"].Value = "CHARTED PROGRESS";
            worksheet.Range["B34"].Value = "DATA ENTRY";
            #endregion

            #region Table
            //initialize table data.
            worksheet.Range["B36:H44"].Value = new object[,] {
                                { "TIME", "DATE", "AM/PM", "SYSTOLIC", "DIASTOLIC", "HEART RATE", "NOTES" },
                                { new TimeSpan(10, 00, 00), DateTime.Parse("7/1/2013 12:00:00 AM"), "AM", 129, 99, 72, null },
                                { new TimeSpan(18, 00, 00), DateTime.Parse("7/1/2013 12:00:00 AM"), "PM", 133, 80, 75, null },
                                { new TimeSpan(10, 30, 00), DateTime.Parse("7/2/2012 12:00:00 AM"), "AM", 142, 86, 70, null },
                                { new TimeSpan(19, 00, 00), DateTime.Parse("7/2/2012 12:00:00 AM"), "PM", 141, 84, 68, null },
                                { new TimeSpan(09, 00, 00), DateTime.Parse("7/3/2012 12:00:00 AM"), "AM", 137, 84, 70, null },
                                { new TimeSpan(18, 30, 00), DateTime.Parse("7/3/2012 12:00:00 AM"), "PM", 139, 83, 72, null },
                                { new TimeSpan(10, 00, 00), DateTime.Parse("7/4/2012 12:00:00 AM"), "AM", 140, 85, 78, null },
                                { new TimeSpan(18, 00, 00), DateTime.Parse("7/4/2012 12:00:00 AM"), "PM", 138, 85, 69, null },
                            };
            ITable table = worksheet.Tables.Add(worksheet.Range["B36:H44"], true);
            table.ShowTotals = true;

            //set total row formulas.
            table.Columns[0].Total.Value = "Average";
            table.Columns[3].TotalsCalculation = TotalsCalculation.Average;
            table.Columns[4].TotalsCalculation = TotalsCalculation.Average;
            table.Columns[5].TotalsCalculation = TotalsCalculation.Average;
            table.Columns[6].TotalsCalculation = TotalsCalculation.None;

            //config data body range and total range's number format.
            table.Columns[0].DataBodyRange.NumberFormat = "h:mm;@";
            table.Columns[1].DataBodyRange.NumberFormat = "m/d/yyyy";
            table.Columns[3].DataBodyRange.NumberFormat = "0";
            table.Columns[4].DataBodyRange.NumberFormat = "0";
            table.Columns[5].DataBodyRange.NumberFormat = "0";
            table.Columns[3].Total.NumberFormat = "0";
            table.Columns[4].Total.NumberFormat = "0";
            table.Columns[5].Total.NumberFormat = "0";

            //config table range's alignment.
            table.Range.HorizontalAlignment = HorizontalAlignment.Left;
            table.Range.IndentLevel = 0;
            table.Range.VerticalAlignment = VerticalAlignment.Center;
            #endregion

            #region TableStyle
            //create a custom table style.
            ITableStyle tablestyle = workbook.TableStyles.Add("testStyle");
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Font.ThemeColor = ThemeColor.Dark1;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Font.TintAndShade = 0.25;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Thin;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeTop].ThemeColor = ThemeColor.Accent1;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeTop].TintAndShade = 0.4;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Thin;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].ThemeColor = ThemeColor.Accent1;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].TintAndShade = 0.4;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Accent1;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].TintAndShade = 0.4;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.Thin;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeLeft].ThemeColor = ThemeColor.Accent1;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeLeft].TintAndShade = 0.4;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.Thin;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeRight].ThemeColor = ThemeColor.Accent1;
            tablestyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeRight].TintAndShade = 0.4;

            tablestyle.TableStyleElements[TableStyleElementType.FirstRowStripe].Interior.ThemeColor = ThemeColor.Accent1;
            tablestyle.TableStyleElements[TableStyleElementType.FirstRowStripe].Interior.TintAndShade = 0.8;

            tablestyle.TableStyleElements[TableStyleElementType.HeaderRow].Font.Bold = true;
            tablestyle.TableStyleElements[TableStyleElementType.HeaderRow].Font.ThemeColor = ThemeColor.Dark1;
            tablestyle.TableStyleElements[TableStyleElementType.HeaderRow].Font.TintAndShade = 0.25;
            tablestyle.TableStyleElements[TableStyleElementType.HeaderRow].Interior.ThemeColor = ThemeColor.Accent1;

            tablestyle.TableStyleElements[TableStyleElementType.TotalRow].Font.Bold = true;
            tablestyle.TableStyleElements[TableStyleElementType.TotalRow].Font.ThemeColor = ThemeColor.Dark1;
            tablestyle.TableStyleElements[TableStyleElementType.TotalRow].Font.TintAndShade = 0.25;
            tablestyle.TableStyleElements[TableStyleElementType.TotalRow].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Double;
            tablestyle.TableStyleElements[TableStyleElementType.TotalRow].Borders[BordersIndex.EdgeTop].ThemeColor = ThemeColor.Accent1;

            //assign custom table style for table.
            table.TableStyle = workbook.TableStyles["testStyle"];
            #endregion

            #region Style
            //assign built-in styles for ranges.
            worksheet.Range["B2:H2"].Style = workbook.Styles["Heading 1"];
            worksheet.Range["B4:F4, B7:D7, B10:D10, B13:D13"].Style = workbook.Styles["Heading 2"];
            worksheet.Range["B16:H16, B34:H34"].Style = workbook.Styles["Heading 3"];

            //modify built-in styles.
            IStyle style_Heading1 = workbook.Styles["Heading 1"];
            style_Heading1.HorizontalAlignment = HorizontalAlignment.General;
            style_Heading1.VerticalAlignment = VerticalAlignment.Center;
            style_Heading1.Font.ThemeFont = ThemeFont.Major;
            style_Heading1.Font.Size = 24;
            style_Heading1.Font.Bold = true;
            style_Heading1.Font.ThemeColor = ThemeColor.Accent1;
            style_Heading1.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
            style_Heading1.Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Accent1;

            style_Heading1.IncludeAlignment = true;
            style_Heading1.IncludeFont = true;
            style_Heading1.IncludeBorder = true;
            style_Heading1.IncludeNumber = false;
            style_Heading1.IncludePatterns = false;
            style_Heading1.IncludeProtection = false;

            IStyle style_Heading2 = workbook.Styles["Heading 2"];
            style_Heading2.HorizontalAlignment = HorizontalAlignment.General;
            style_Heading2.VerticalAlignment = VerticalAlignment.Bottom;
            style_Heading2.Font.ThemeFont = ThemeFont.Minor;
            style_Heading2.Font.Size = 14;
            style_Heading2.Font.ThemeColor = ThemeColor.Dark1;
            style_Heading2.Font.TintAndShade = 0.25;
            style_Heading2.Font.Bold = false;
            style_Heading2.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Dotted;
            style_Heading2.Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Light1;
            style_Heading2.Borders[BordersIndex.EdgeBottom].TintAndShade = -0.5;

            style_Heading2.IncludeAlignment = true;
            style_Heading2.IncludeFont = true;
            style_Heading2.IncludeBorder = true;
            style_Heading2.IncludeNumber = false;
            style_Heading2.IncludePatterns = false;
            style_Heading2.IncludeProtection = false;

            IStyle style_Heading3 = workbook.Styles["Heading 3"];
            style_Heading3.HorizontalAlignment = HorizontalAlignment.General;
            style_Heading3.VerticalAlignment = VerticalAlignment.Center;
            style_Heading3.Font.ThemeFont = ThemeFont.Minor;
            style_Heading3.Font.Size = 14;
            style_Heading3.Font.Bold = true;
            style_Heading3.Font.ThemeColor = ThemeColor.Dark1;
            style_Heading3.Font.TintAndShade = 0.25;
            style_Heading3.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
            style_Heading3.Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Accent2;

            style_Heading3.IncludeAlignment = true;
            style_Heading3.IncludeFont = true;
            style_Heading3.IncludeBorder = true;
            style_Heading3.IncludeNumber = false;
            style_Heading3.IncludePatterns = false;
            style_Heading3.IncludeProtection = false;

            IStyle style_Normal = workbook.Styles["Normal"];
            style_Normal.NumberFormat = "General";
            style_Normal.HorizontalAlignment = HorizontalAlignment.General;
            style_Normal.VerticalAlignment = VerticalAlignment.Center;
            style_Normal.Font.ThemeFont = ThemeFont.Minor;
            style_Normal.Font.Size = 10;
            style_Normal.Font.ThemeColor = ThemeColor.Dark1;
            style_Normal.Font.TintAndShade = 0.25;

            style_Normal.IncludeAlignment = true;
            style_Normal.IncludeFont = true;
            style_Normal.IncludeBorder = true;
            style_Normal.IncludeNumber = true;
            style_Normal.IncludePatterns = true;
            style_Normal.IncludeProtection = true;

            //modify cell styles.
            worksheet.Range["B4"].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            worksheet.Range["C4:F4"].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            IRange range1 = worksheet.Range["E7:F7, E10:F10"];
            range1.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Dotted;
            range1.Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Light1;
            range1.Borders[BordersIndex.EdgeBottom].TintAndShade = -0.5;
            range1.Font.Bold = true;
            IRange range2 = worksheet.Range["E7, E10"];
            range2.Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.Thin;
            range2.Borders[BordersIndex.EdgeRight].ThemeColor = ThemeColor.Light1;
            range2.Borders[BordersIndex.EdgeRight].TintAndShade = -0.5;
            #endregion

            #region Chart
            //create a new chart.
            IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 8.99984251968504, 268.5, 627.750157480315, 184.5);

            //create series for chart.
            ISeries series_systolic = shape.Chart.SeriesCollection.NewSeries();
            ISeries series_diatolic = shape.Chart.SeriesCollection.NewSeries();
            ISeries series_HeartRate = shape.Chart.SeriesCollection.NewSeries();

            //set series formulas.
            series_systolic.Formula = "=SERIES('BLOOD PRESSURE DATA'!$E$36,'BLOOD PRESSURE DATA'!$C$37:$D$44,'BLOOD PRESSURE DATA'!$E$37:$E$44,1)";
            series_diatolic.Formula = "=SERIES('BLOOD PRESSURE DATA'!$F$36,'BLOOD PRESSURE DATA'!$C$37:$D$44,'BLOOD PRESSURE DATA'!$F$37:$F$44,2)";

            //set series plot on secondary axis, and change its chart type.
            series_HeartRate.AxisGroup = AxisGroup.Secondary;
            series_HeartRate.ChartType = ChartType.Line;
            series_HeartRate.Formula = "=SERIES('BLOOD PRESSURE DATA'!$G$36,,'BLOOD PRESSURE DATA'!$G$37:$G$44,3)";

            //set series fill to gradient fill.
            series_systolic.Format.Fill.TwoColorGradient(GradientStyle.Horizontal, 1);
            series_systolic.Format.Fill.GradientAngle = 270;
            series_systolic.Format.Fill.GradientStops[0].Color.RGB = Color.FromRGB(255, 172, 175);
            series_systolic.Format.Fill.GradientStops[1].Color.RGB = Color.FromRGB(255, 227, 228);
            series_systolic.Format.Fill.GradientStops.Insert(0xFEC6C8, 0.35);
            series_systolic.Format.Line.Color.ObjectThemeColor = ThemeColor.Accent6;

            series_diatolic.Format.Fill.TwoColorGradient(GradientStyle.Horizontal, 1);
            series_diatolic.Format.Fill.GradientAngle = 270;
            series_diatolic.Format.Fill.GradientStops[0].Color.RGB = Color.FromRGB(255, 192, 147);
            series_diatolic.Format.Fill.GradientStops[1].Color.RGB = Color.FromRGB(255, 227, 212);
            series_diatolic.Format.Fill.GradientStops.Insert(0xFFCBA9, 0.35);
            series_diatolic.Format.Line.Color.ObjectThemeColor = ThemeColor.Accent5;

            //set series gap width and overlap.
            shape.Chart.ColumnGroups[0].GapWidth = 150;
            shape.Chart.ColumnGroups[0].Overlap = 0;

            //set series line style.
            series_HeartRate.Format.Line.BeginArrowheadLength = ArrowheadLength.Medium;
            series_HeartRate.Format.Line.BeginArrowheadStyle = ArrowheadStyle.None;
            series_HeartRate.Format.Line.BeginArrowheadWidth = ArrowheadWidth.Medium;
            series_HeartRate.Format.Line.Color.ObjectThemeColor = ThemeColor.Accent4;
            series_HeartRate.Format.Line.Color.TintAndShade = 0;
            series_HeartRate.Format.Line.DashStyle = LineDashStyle.Solid;
            series_HeartRate.Format.Line.EndArrowheadLength = ArrowheadLength.Medium;
            series_HeartRate.Format.Line.EndArrowheadStyle = ArrowheadStyle.None;
            series_HeartRate.Format.Line.EndArrowheadWidth = ArrowheadWidth.Medium;
            series_HeartRate.Format.Line.Style = LineStyle.Single;
            series_HeartRate.Format.Line.Weight = 1.25;

            IAxis primary_axis = shape.Chart.Axes.Item(AxisType.Value, AxisGroup.Primary);
            primary_axis.HasTitle = true;
            primary_axis.AxisTitle.Text = "BLOOD PRESSURE";
            primary_axis.AxisTitle.IncludeInLayout = true;

            IAxis secondary_axis = shape.Chart.Axes.Item(AxisType.Value, AxisGroup.Secondary);
            secondary_axis.HasTitle = true;
            secondary_axis.AxisTitle.Text = "HEART RATE";
            secondary_axis.AxisTitle.IncludeInLayout = true;

            IAxis category_axis = shape.Chart.Axes.Item(AxisType.Category, AxisGroup.Primary);
            category_axis.HasTitle = true;
            category_axis.CategoryType = CategoryType.CategoryScale;
            category_axis.Format.Line.Color.ColorType = SolidColorType.None;

            shape.Chart.HasTitle = false;
            //set chart font style.
            shape.Chart.ChartArea.Font.Size = 9;
            shape.Chart.ChartArea.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            shape.Chart.ChartArea.Font.Color.Brightness = 0.5;
            #endregion


            #region Shape
            IShape shape1 = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 402, 77.25, 234, 100);
            shape1.Fill.Solid();
            shape1.Fill.Color.ObjectThemeColor = ThemeColor.Accent1;
            shape1.Fill.Color.Brightness = 0.6;
            //set shape's border to no line.
            shape1.Line.Color.ColorType = SolidColorType.None;

            //set shape rich text.
            ITextRange shape1_p1 = shape1.TextFrame.TextRange.Paragraphs[0];
            shape1_p1.Text = "*";
            shape1_p1.Runs.Add(" Blood pressures may vary dependent on many");
            shape1_p1.Runs.Add(" factors.  Always consult with a physician about what is normal for you.  These numbers may vary slightly.");
            
            ITextRange shape1_p2 = shape1.TextFrame.TextRange.Paragraphs.Add("");
            ITextRange shape1_p3 = shape1.TextFrame.TextRange.Paragraphs.Add("Info from National Institute of Health:");
            ITextRange shape1_p4 = shape1.TextFrame.TextRange.Paragraphs.Add("http://www.nhlbi.nih.gov/health/health-topics/topics/hbp/");

            shape1.TextFrame.TextRange.Font.Size = 10;
            shape1.TextFrame.TextRange.Font.ThemeFont = ThemeFont.Minor;
            shape1.TextFrame.TextRange.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            shape1.TextFrame.TextRange.Font.Color.Brightness = 0.25;
            shape1_p3.Runs[0].Font.Bold = true;

            IShape shape2 = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 421.5, 546.75, 198, 50);
            shape2.Fill.Solid();
            shape2.Fill.Color.ObjectThemeColor = ThemeColor.Accent3;
            shape2.Fill.Color.Brightness = 0.6;
            //set shape's border to no line.
            shape2.Line.Color.ColorType = SolidColorType.None;

            ITextRange shape2_p1 = shape2.TextFrame.TextRange.Paragraphs[0];
            shape2_p1.Text = "NOTE:";
            shape2_p1.Runs.Add(" Any blood pressure readings over the indicated numbers (\"CALL PHYSICIAN IF ABOVE\") will be");
            shape2_p1.Runs.Add(" highlighted.");

            shape2.TextFrame.TextRange.Font.Size = 10;
            shape2.TextFrame.TextRange.Font.ThemeFont = ThemeFont.Minor;
            shape2.TextFrame.TextRange.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            shape2.TextFrame.TextRange.Font.Color.Brightness = 0.25;
            shape2_p1.Runs[0].Font.Bold = true;
            #endregion

            #region DefinedName
            //create defined names for workbook.
            workbook.Names.Add("MaxDiastolic", "='BLOOD PRESSURE DATA'!$F$10");
            workbook.Names.Add("MaxSystolic", "='BLOOD PRESSURE DATA'!$E$10");
            #endregion

            #region ConditionalFormat
            //create conditional format for ranges.
            IFormatCondition condition1 = worksheet.Range["E37:E44"].FormatConditions.Add(FormatConditionType.Expression, formula1: "=E37&gt;MaxSystolic") as IFormatCondition;
            IFormatCondition condition2 = worksheet.Range["F37:F44"].FormatConditions.Add(FormatConditionType.Expression, formula1: "=F37&gt;MaxDiastolic") as IFormatCondition;
            condition1.Interior.Color = Color.Red;
            condition2.Interior.Color = Color.Red;
            #endregion
           //save to an excel file
   workbook.Save("BloodPressureTracker.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.CostAnalysisWithParetoChart" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,] {
                { "Cost Center", "Annual Cost", "Percent of Total", "Cumulative Percent" },
                { "Parts and materials", 1325000, null, null },
                { "Manufacturing equipment", 900500, null, null },
                { "Salaries", 575000, null, null },
                { "Maintenance", 395000, null, null },
                { "Office lease", 295000, null, null },
                { "Warehouse lease", 250000, null, null },
                { "Insurance", 180000, null, null },
                { "Benefits and pensions", 130000, null, null },
                { "Vehicles", 125000, null, null },
                { "Research", 75000, null, null },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Name = "COST DATA and CHART";
            worksheet.TabColor = Color.FromRGB(63, 94, 101);
            worksheet.SheetView.DisplayGridlines = false;

            //Set Value.
            worksheet.Range["B2"].Value = "COST ANALYSIS - PARETO";
            worksheet.Range["B39"].Value = "COST ANALYSIS";
            worksheet.Range["B41:E51"].Value = data;

            //Set NumberFormat.
            worksheet.Range["C42:C52"].NumberFormat = "\"$\"#,##0.00_);[Red](\"$\"#,##0.00)";
            worksheet.Range["D42:E52"].NumberFormat = "0.00%";

            //Change the range's RowHeight and ColumnWidth.
            worksheet.StandardHeight = 15.75;
            worksheet.StandardWidth = 8.43;
            worksheet.Range["1:1"].RowHeight = 12.75;
            worksheet.Range["2:2"].RowHeight = 20.25;
            worksheet.Range["3:3"].RowHeight = 16.5;
            worksheet.Range["39:39"].RowHeight = 20.25;
            worksheet.Range["40:40"].RowHeight = 16.5;
            worksheet.Range["41:41"].RowHeight = 29.25;
            worksheet.Range["42:51"].RowHeight = 20.1;
            worksheet.Range["A:A"].ColumnWidth = 1.44140625;
            worksheet.Range["B:B"].ColumnWidth = 25.88671875;
            worksheet.Range["C:C"].ColumnWidth = 18.5546875;
            worksheet.Range["D:D"].ColumnWidth = 17.77734375;
            worksheet.Range["E:E"].ColumnWidth = 20.77734375;

            //Apply one build in name style on the ranges.
            worksheet.Range["B2:J2"].Style = workbook.Styles["Heading 1"];
            worksheet.Range["B39:E39"].Style = workbook.Styles["Heading 1"];

            //Create a table and apply one build in table style.
            ITable table = worksheet.Tables.Add(worksheet.Range["B41:E51"], true);
            table.Name = "tblData";
            table.TableStyle = workbook.TableStyles["TableStyleLight9"];
            table.ShowTotals = true;
            table.ShowTableStyleRowStripes = true;

            //Use table formula in table range.
            worksheet.Range["D42:D51"].Formula = "=[@[Annual Cost]]/SUM([[Annual Cost]])";
            worksheet.Range["E42:E51"].Formula = "=SUM(INDEX([Percent of Total],1):[@[Percent of Total]])";
            table.Columns[1].TotalsCalculation = TotalsCalculation.Sum;
            table.Columns[2].TotalsCalculation = TotalsCalculation.Sum;
            table.Columns[3].TotalsCalculation = TotalsCalculation.None;

            //Add chart.
            IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 9.75, 48, 597, 472.5);
            shape.Name = "Pareto Chart";

            //Add Series.
            ISeries series_ColumnClustered = shape.Chart.SeriesCollection.NewSeries();
            series_ColumnClustered.Formula = "=SERIES('COST DATA and CHART'!$C$41,'COST DATA and CHART'!$B$42:$B$51,'COST DATA and CHART'!$C$42:$C$51,1)";
            series_ColumnClustered.Format.Fill.TwoColorGradient(GradientStyle.Horizontal, 1);
            series_ColumnClustered.Format.Fill.GradientAngle = 90;
            series_ColumnClustered.Format.Fill.GradientStops[0].Color.ObjectThemeColor = ThemeColor.Accent1;
            series_ColumnClustered.Format.Fill.GradientStops[0].Color.Brightness = 0;
            series_ColumnClustered.Format.Fill.GradientStops[0].Position = 0;
            series_ColumnClustered.Format.Fill.GradientStops[1].Color.ObjectThemeColor = ThemeColor.Accent1;
            series_ColumnClustered.Format.Fill.GradientStops[1].Color.Brightness = -0.16;
            series_ColumnClustered.Format.Fill.GradientStops[1].Position = 1;
            series_ColumnClustered.Format.Line.Color.ObjectThemeColor = ThemeColor.Light1;

            ISeries series_Line = shape.Chart.SeriesCollection.NewSeries();
            series_Line.ChartType = ChartType.Line;
            series_Line.Formula = "=SERIES('COST DATA and CHART'!$E$41,,'COST DATA and CHART'!$E$42:$E$51,2)";
            series_Line.Format.Line.Weight = 2.25;
            series_Line.AxisGroup = AxisGroup.Secondary;

            //Change the secondary's maxinumscale.
            IAxis secondary_axis = shape.Chart.Axes.Item(AxisType.Value, AxisGroup.Secondary);
            secondary_axis.MaximumScale = 1.0;

            //Set the chart's title format.
            shape.Chart.ChartTitle.Text = "Cost Center";
            shape.Chart.ChartTitle.Font.ThemeFont = ThemeFont.Minor;
            shape.Chart.ChartTitle.Font.Color.RGB = Color.FromRGB(89, 89, 89);
            shape.Chart.ChartTitle.Font.Size = 18;

            //Set the chart has no legend.
            shape.Chart.HasLegend = false;

            //Set the char group's Overlap and GapWidth.
            shape.Chart.ColumnGroups[0].Overlap = 0;
            shape.Chart.ColumnGroups[0].GapWidth = 0;

            //Set chart area's format.
            shape.Chart.ChartArea.Format.Fill.PresetGradient(GradientStyle.Horizontal, 1, PresetGradientType.EarlySunset);
            shape.Chart.ChartArea.Format.Fill.GradientStops.Delete(3);
            shape.Chart.ChartArea.Format.Fill.GradientStops.Delete(3);
            shape.Chart.ChartArea.Format.Fill.GradientAngle = 90;
            shape.Chart.ChartArea.Format.Fill.GradientStops[0].Color.ObjectThemeColor = ThemeColor.Light1;
            shape.Chart.ChartArea.Format.Fill.GradientStops[0].Color.Brightness = 0;
            shape.Chart.ChartArea.Format.Fill.GradientStops[0].Position = 0;
            shape.Chart.ChartArea.Format.Fill.GradientStops[1].Color.ObjectThemeColor = ThemeColor.Light1;
            shape.Chart.ChartArea.Format.Fill.GradientStops[1].Color.Brightness = -0.15;
            shape.Chart.ChartArea.Format.Fill.GradientStops[1].Position = 0.68;
            shape.Chart.ChartArea.Format.Fill.GradientStops[2].Color.ObjectThemeColor = ThemeColor.Light1;
            shape.Chart.ChartArea.Format.Fill.GradientStops[2].Color.Brightness = 0;
            shape.Chart.ChartArea.Format.Fill.GradientStops[2].Position = 1;

            //Create customize theme.
            Themes themes = new Themes();
            ITheme theme = themes.Add("test");
            theme.ThemeColorScheme[ThemeColor.Dark1].RGB = Color.FromRGB(0, 0, 0);
            theme.ThemeColorScheme[ThemeColor.Light1].RGB = Color.FromRGB(255, 255, 255);
            theme.ThemeColorScheme[ThemeColor.Dark2].RGB = Color.FromRGB(96, 89, 88);
            theme.ThemeColorScheme[ThemeColor.Light2].RGB = Color.FromRGB(241, 246, 246);
            theme.ThemeColorScheme[ThemeColor.Accent1].RGB = Color.FromRGB(63, 94, 101);
            theme.ThemeColorScheme[ThemeColor.Accent2].RGB = Color.FromRGB(224, 170, 83);
            theme.ThemeColorScheme[ThemeColor.Accent3].RGB = Color.FromRGB(179, 29, 66);
            theme.ThemeColorScheme[ThemeColor.Accent4].RGB = Color.FromRGB(162, 67, 162);
            theme.ThemeColorScheme[ThemeColor.Accent5].RGB = Color.FromRGB(120, 59, 101);
            theme.ThemeColorScheme[ThemeColor.Accent6].RGB = Color.FromRGB(55, 120, 169);
            theme.ThemeColorScheme[ThemeColor.Hyperlink].RGB = Color.FromRGB(71, 166, 181);
            theme.ThemeColorScheme[ThemeColor.FollowedHyperlink].RGB = Color.FromRGB(120, 59, 101);
            theme.ThemeFontScheme.Major[FontLanguageIndex.Latin].Name = "Constantia";
            theme.ThemeFontScheme.Minor[FontLanguageIndex.Latin].Name = "Franklin Gothic Book";

            //Apply the above custom theme.
            workbook.Theme = theme;

            //Set active cell.
            worksheet.Range["B43"].Activate();
           //save to an excel file
   workbook.Save("CostAnalysisWithParetoChart.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.CustomerProfitabilityAnalysis" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,] {
	            { null, "[Segment Name]", "[Segment Name]", "[Segment Name]", "Overall" },
	            { "Customer Activity:", null, null, null, null },
	            { "Number of active customers—Beginning of period", 5, 8, 8, null },
	            { "Number of customers added", 2, 4, 4, null },
	            { "Number of customers lost/terminated", -1, -2, -2, null },
	            { "Number of active customers—End of period", null, null, null, null },
	            { null, null, null, null, null },
	            { "Profitability Analysis:", null, null, null, null },
	            { "Revenue per segment", 1500000, 1800000, 2500000, null },
	            { "Weighting", null, null, null, null },
	            { null, null, null, null, null },
	            { "Cost of sales:", null, null, null, null },
	            { "Ongoing service and support costs", 1000000, 1400000, 1400000, null },
	            { "Other direct customer costs", 200000, 100000, 100000, null },
	            { "Total cost of sales", null, null, null, null },
	            { "Gross margin", null, null, null, null },
	            { "Weighting", null, null, null, null },
	            { null, null, null, null, null },
	            { "Other costs:", null, null, null, null },
	            { "Customer acquisition", 105000, 120000, 235000, null },
	            { "Customer marketing", 150000, 125000, 275000, null },
	            { "Customer termination", 80000, 190000, 140000, null },
	            { "Total other customer costs", null, null, null, null },
	            { "Customer profit by segment", null, null, null, null },
	            { "Weighting", null, null, null, null },
	            { null, null, null, null, null },
	            { "Summary Metrics:", "[Segment Name]", "[Segment Name]", "[Segment Name]", "Trend" },
	            { "Average cost per acquired customer", null, null, null, null },
	            { "Average cost per terminated customer", null, null, null, null },
	            { "Average marketing cost per active customer", null, null, null, null },
	            { "Average profit (loss) per customer", null, null, null, null },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Name = "Customer Profitability";
            worksheet.TabColor = Color.FromRGB(131, 172, 121);
            worksheet.SheetView.DisplayGridlines = false;

            //Set Value.
            worksheet.Range["B2"].Value = "[Company Name]";
            worksheet.Range["B3"].Value = "Customer Profitability Analysis";
            worksheet.Range["B4"].Value = "[Date]";
            worksheet.Range["B6"].Value = "Gray cells will be calculated for you. You do not need to enter anything into them.";
            worksheet.Range["B7:F37"].Value = data;

            //Set formula.
            worksheet.Range["F9:F11"].Formula = "=SUM(C9:E9)";
            worksheet.Range["C12:F12"].Formula = "=SUM(C9:C11)";

            worksheet.Range["C16:E16"].Formula = "=+C15/$F$15";
            worksheet.Range["F15:F16"].Formula = "=SUM(C15:E15)";

            worksheet.Range["F19:F20"].Formula = "=SUM(C19:E19)";
            worksheet.Range["C21:F21"].Formula = "=SUM(C19:C20)";
            worksheet.Range["C22:F22"].Formula = "=+C15-C21";
            worksheet.Range["C23:E23"].Formula = "=MAX(0, MIN(1,C22/$F$22))";
            worksheet.Range["F23"].Formula = "=SUM(C23:E23)";

            worksheet.Range["F26:F28"].Formula = "=SUM(C26:E26)";
            worksheet.Range["C29:F29"].Formula = "=SUM(C26:C28)";
            worksheet.Range["C30:E30"].Formula = "=+C22-C29";
            worksheet.Range["C31:E31"].Formula = "=MAX(0,MIN(1, C30/$F$30))";
            worksheet.Range["F30:F31"].Formula = "=SUM(C30:E30)";

            worksheet.Range["C34:E34"].Formula = "=+C26/C10";
            worksheet.Range["C35:E35"].Formula = "=-C28/C11";
            worksheet.Range["C36:E36"].Formula = "=+C27/C12";
            worksheet.Range["C37:E37"].Formula = "=+C30/C12";

            //Change the range's RowHeight and ColumnWidth.
            worksheet.StandardHeight = 15;
            worksheet.StandardWidth = 9.140625;
            worksheet.Rows[0].RowHeight = 9.95;
            worksheet.Rows[1].RowHeight = 33;
            worksheet.Rows[2].RowHeight = 27;
            worksheet.Rows[3].RowHeight = 19.5;
            worksheet.Rows[4].RowHeight = 9;
            worksheet.Rows[5].RowHeight = 19.5;
            worksheet.Rows[6].RowHeight = 18;
            worksheet.Rows[12].RowHeight = 9;
            worksheet.Rows[16].RowHeight = 9;
            worksheet.Rows[23].RowHeight = 9;
            worksheet.Rows[31].RowHeight = 9;

            worksheet.Columns[0].ColumnWidth = 1.85546875;
            worksheet.Columns[1].ColumnWidth = 46.7109375;
            worksheet.Columns[2].ColumnWidth = 16.42578125;
            worksheet.Columns[3].ColumnWidth = 16.42578125;
            worksheet.Columns[4].ColumnWidth = 16.42578125;
            worksheet.Columns[5].ColumnWidth = 16.42578125;

            //Modify the build in name styles.
            var nameStyle_Normal = workbook.Styles["Normal"];
            nameStyle_Normal.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Normal.Font.ThemeColor = ThemeColor.Dark1;
            nameStyle_Normal.Font.TintAndShade = 0.249946592608417;
            nameStyle_Normal.Font.Size = 10;

            var nameStyle_Heading_1 = workbook.Styles["Heading 1"];
            nameStyle_Heading_1.HorizontalAlignment = HorizontalAlignment.Left;
            nameStyle_Heading_1.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Heading_1.Font.ThemeFont = ThemeFont.Major;
            nameStyle_Heading_1.Font.Bold = false;
            nameStyle_Heading_1.Font.Size = 24;
            nameStyle_Heading_1.Font.ThemeColor = ThemeColor.Dark1;
            nameStyle_Heading_1.Font.TintAndShade = 0.249946592608417;
            nameStyle_Heading_1.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            nameStyle_Heading_1.IncludeAlignment = true;

            var nameStyle_Heading_2 = workbook.Styles["Heading 2"];
            nameStyle_Heading_2.HorizontalAlignment = HorizontalAlignment.Left;
            nameStyle_Heading_2.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Heading_2.Font.ThemeFont = ThemeFont.Major;
            nameStyle_Heading_2.Font.Bold = false;
            nameStyle_Heading_2.Font.Size = 20;
            nameStyle_Heading_2.Font.ThemeColor = ThemeColor.Dark1;
            nameStyle_Heading_2.Font.TintAndShade = 0.249946592608417;
            nameStyle_Heading_2.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            nameStyle_Heading_2.Interior.ThemeColor = ThemeColor.Accent3;
            nameStyle_Heading_2.Interior.TintAndShade = 0.39994506668294322;
            nameStyle_Heading_2.IncludeNumber = true;
            nameStyle_Heading_2.IncludePatterns = true;

            var nameStyle_Heading_3 = workbook.Styles["Heading 3"];
            nameStyle_Heading_3.HorizontalAlignment = HorizontalAlignment.Left;
            nameStyle_Heading_3.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Heading_3.Font.ThemeFont = ThemeFont.Major;
            nameStyle_Heading_3.Font.Bold = false;
            nameStyle_Heading_3.Font.Size = 14;
            nameStyle_Heading_3.Font.ThemeColor = ThemeColor.Dark1;
            nameStyle_Heading_3.Font.TintAndShade = 0.249946592608417;
            nameStyle_Heading_3.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            nameStyle_Heading_3.IncludeAlignment = true;
            nameStyle_Heading_3.IncludePatterns = true;

            var nameStyle_Heading_4 = workbook.Styles["Heading 4"];
            nameStyle_Heading_4.HorizontalAlignment = HorizontalAlignment.Left;
            nameStyle_Heading_4.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Heading_4.Font.ThemeFont = ThemeFont.Major;
            nameStyle_Heading_4.Font.Bold = true;
            nameStyle_Heading_4.Font.Size = 10;
            nameStyle_Heading_4.Font.ThemeColor = ThemeColor.Light1;
            nameStyle_Heading_4.Font.TintAndShade = -0.0499893185216834;
            nameStyle_Heading_4.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            nameStyle_Heading_4.Interior.ThemeColor = ThemeColor.Accent3;
            nameStyle_Heading_4.Interior.TintAndShade = -0.249946592608417;
            nameStyle_Heading_4.IncludeAlignment = true;
            nameStyle_Heading_4.IncludeBorder = true;
            nameStyle_Heading_4.IncludePatterns = true;

            //Apply the above name styles on ranges.
            worksheet.Range["B2:F2"].Style = workbook.Styles["Heading 1"];
            worksheet.Range["B3:F3"].Style = workbook.Styles["Heading 2"];
            worksheet.Range["B4:F4"].Style = workbook.Styles["Heading 3"];
            worksheet.Range["B8:F8"].Style = workbook.Styles["Heading 4"];
            worksheet.Range["B14:F14"].Style = workbook.Styles["Heading 4"];
            worksheet.Range["B18:F18"].Style = workbook.Styles["Heading 4"];
            worksheet.Range["B25:F25"].Style = workbook.Styles["Heading 4"];
            worksheet.Range["B33:F33"].Style = workbook.Styles["Heading 4"];

            //Set NumberFormat.
            worksheet.Range["C9:F12"].NumberFormat = "0_);[Red](0)";
            worksheet.Range["C15:F15"].NumberFormat = "\"$\"#,##0.00_);[Red](\"$\"#,##0.00)";
            worksheet.Range["C16:F16"].NumberFormat = "0%";
            worksheet.Range["C19:F22"].NumberFormat = "\"$\"#,##0.00_);[Red](\"$\"#,##0.00)";
            worksheet.Range["C23:F23"].NumberFormat = "0%";
            worksheet.Range["C26:F30"].NumberFormat = "\"$\"#,##0.00_);[Red](\"$\"#,##0.00)";
            worksheet.Range["C31:F31"].NumberFormat = "0%";
            worksheet.Range["C34:F37"].NumberFormat = "\"$\"#,##0.00_);[Red](\"$\"#,##0.00)";

            //Set range's font style.
            worksheet.Range["B6"].Font.TintAndShade = 0.34998626667073579;
            worksheet.Range["B6"].Font.Size = 8;
            worksheet.Range["B6"].Font.Italic = true;
            worksheet.Range["C7:F7"].Font.TintAndShade = 0;
            worksheet.Range["B9:F12"].Font.TintAndShade = 0;
            worksheet.Range["B15:F16"].Font.TintAndShade = 0;
            worksheet.Range["B19:F23"].Font.TintAndShade = 0;
            worksheet.Range["B26:F31"].Font.TintAndShade = 0;
            worksheet.Range["B34:F37"].Font.TintAndShade = 0;
            worksheet.Range["C33:F33"].Font.Bold = false;

            //Set range's alignment.
            worksheet.Range["C7:F7"].HorizontalAlignment = HorizontalAlignment.Center;
            worksheet.Range["C33:F33"].HorizontalAlignment = HorizontalAlignment.Center;

            //Set range's border
            worksheet.Range["B9:F12"].Borders.LineStyle = BorderLineStyle.Thin;
            worksheet.Range["B9:F12"].Borders.ThemeColor = ThemeColor.Accent3;
            worksheet.Range["B9:F12"].Borders.TintAndShade = 0.39994506668294322;

            worksheet.Range["B15:F16"].Borders.LineStyle = BorderLineStyle.Thin;
            worksheet.Range["B15:F16"].Borders.ThemeColor = ThemeColor.Accent3;
            worksheet.Range["B15:F16"].Borders.TintAndShade = 0.39994506668294322;

            worksheet.Range["B19:F23"].Borders.LineStyle = BorderLineStyle.Thin;
            worksheet.Range["B19:F23"].Borders.ThemeColor = ThemeColor.Accent3;
            worksheet.Range["B19:F23"].Borders.TintAndShade = 0.39994506668294322;

            worksheet.Range["B26:F31"].Borders.LineStyle = BorderLineStyle.Thin;
            worksheet.Range["B26:F31"].Borders.ThemeColor = ThemeColor.Accent3;
            worksheet.Range["B26:F31"].Borders.TintAndShade = 0.39994506668294322;

            worksheet.Range["B34:F37"].Borders.LineStyle = BorderLineStyle.Thin;
            worksheet.Range["B34:F37"].Borders.ThemeColor = ThemeColor.Accent3;
            worksheet.Range["B34:F37"].Borders.TintAndShade = 0.39994506668294322;

            //Set range's fill.
            worksheet.Range["F9:F12"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["F9:F12"].Interior.TintAndShade = -0.0499893185216834;
            worksheet.Range["C12:E12"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["C12:E12"].Interior.TintAndShade = -0.0499893185216834;
            worksheet.Range["F15:F16"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["F15:F16"].Interior.TintAndShade = -0.0499893185216834;
            worksheet.Range["C16:E16"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["C16:E16"].Interior.TintAndShade = -0.0499893185216834;
            worksheet.Range["F19:F23"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["F19:F23"].Interior.TintAndShade = -0.0499893185216834;
            worksheet.Range["C21:E23"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["C21:E23"].Interior.TintAndShade = -0.0499893185216834;
            worksheet.Range["F26:F31"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["F26:F31"].Interior.TintAndShade = -0.0499893185216834;
            worksheet.Range["C29:E31"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["C29:E31"].Interior.TintAndShade = -0.0499893185216834;
            worksheet.Range["C34:E37"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["C34:E37"].Interior.TintAndShade = -0.0499893185216834;

            //create a new group of sparklines.
            ISparklineGroup sparklineGroup = worksheet.Range["F34:F37"].SparklineGroups.Add(SparkType.Line, "C34:E37");
            sparklineGroup.SeriesColor.ThemeColor = ThemeColor.Accent3;
            sparklineGroup.SeriesColor.TintAndShade = -0.249977111117893;
            sparklineGroup.Points.Negative.Color.ThemeColor = ThemeColor.Accent4;
            sparklineGroup.Points.Markers.Color.ThemeColor = ThemeColor.Accent4;
            sparklineGroup.Points.Markers.Color.TintAndShade = -0.249977111117893;
            sparklineGroup.Points.Highpoint.Color.ThemeColor = ThemeColor.Accent4;
            sparklineGroup.Points.Highpoint.Color.TintAndShade = -0.249977111117893;
            sparklineGroup.Points.Lowpoint.Color.ThemeColor = ThemeColor.Accent4;
            sparklineGroup.Points.Lowpoint.Color.TintAndShade = -0.249977111117893;
            sparklineGroup.Points.Firstpoint.Color.ThemeColor = ThemeColor.Accent4;
            sparklineGroup.Points.Firstpoint.Color.TintAndShade = -0.249977111117893;
            sparklineGroup.Points.Lastpoint.Color.ThemeColor = ThemeColor.Accent4;
            sparklineGroup.Points.Lastpoint.Color.TintAndShade = -0.249977111117893;
            sparklineGroup.Points.Negative.Visible = false;
            sparklineGroup.Points.Firstpoint.Visible = false;
            sparklineGroup.Points.Lastpoint.Visible = false;

            //Add chart.
            IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 9.75, 576.95, 590.25, 237);
            shape.Name = "Chart 3";

            //Add Series.
            ISeries series1 = shape.Chart.SeriesCollection.NewSeries();
            series1.Formula = "=SERIES('Customer Profitability'!$B$34,'Customer Profitability'!$C$33:$E$33,'Customer Profitability'!$C$34:$E$34,1)";
            series1.Format.Fill.Color.ObjectThemeColor = ThemeColor.Accent2;

            ISeries series2 = shape.Chart.SeriesCollection.NewSeries();
            series2.Formula = "=SERIES('Customer Profitability'!$B$35,'Customer Profitability'!$C$33:$E$33,'Customer Profitability'!$C$35:$E$35,2)";
            series2.Format.Fill.Color.ObjectThemeColor = ThemeColor.Accent4;

            ISeries series3 = shape.Chart.SeriesCollection.NewSeries();
            series3.Formula = "=SERIES('Customer Profitability'!$B$36,'Customer Profitability'!$C$33:$E$33,'Customer Profitability'!$C$36:$E$36,3)";
            series3.Format.Fill.Color.ObjectThemeColor = ThemeColor.Accent3;

            ISeries series4 = shape.Chart.SeriesCollection.NewSeries();
            series4.Formula = "=SERIES('Customer Profitability'!$B$37,'Customer Profitability'!$C$33:$E$33,'Customer Profitability'!$C$37:$E$37,4)";
            series4.Format.Fill.Color.ObjectThemeColor = ThemeColor.Accent5;

            //Set the char group's Overlap and GapWidth.
            shape.Chart.ColumnGroups[0].Overlap = 0;
            shape.Chart.ColumnGroups[0].GapWidth = 199;

            //Set the chart's title format.
            var chartTitle = shape.Chart.ChartTitle;
            chartTitle.Text = "Summary Metrics per Customer Segment";
            chartTitle.Font.ThemeFont = ThemeFont.Major;
            chartTitle.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            chartTitle.Font.Size = 20;

            //Set the chart legend's position.
            shape.Chart.Legend.Position = LegendPosition.Top;

            //Set category axis format.
            IAxis category_axis = shape.Chart.Axes.Item(AxisType.Category);
            category_axis.HasTitle = true;
            category_axis.AxisTitle.Text = "SEGMENT";
            category_axis.AxisTitle.Font.Size = 9;
            category_axis.AxisTitle.Font.ThemeFont = ThemeFont.Minor;

            //Set value axis format.
            IAxis value_axis = shape.Chart.Axes.Item(AxisType.Value);
            value_axis.CrossesAt = -200000;
            value_axis.HasMinorGridlines = true;
            value_axis.MinorGridlines.Format.Line.Color.ObjectThemeColor = ThemeColor.Dark1;
            value_axis.MinorGridlines.Format.Line.Color.Brightness = 0.95;

            //Create customize theme.
            Themes themes = new Themes();
            ITheme theme = themes.Add("test");
            theme.ThemeColorScheme[ThemeColor.Dark1].RGB = Color.FromRGB(0, 0, 0);
            theme.ThemeColorScheme[ThemeColor.Light1].RGB = Color.FromRGB(255, 255, 255);
            theme.ThemeColorScheme[ThemeColor.Dark2].RGB = Color.FromRGB(77, 70, 70);
            theme.ThemeColorScheme[ThemeColor.Light2].RGB = Color.FromRGB(255, 251, 239);
            theme.ThemeColorScheme[ThemeColor.Accent1].RGB = Color.FromRGB(255, 225, 132);
            theme.ThemeColorScheme[ThemeColor.Accent2].RGB = Color.FromRGB(102, 173, 166);
            theme.ThemeColorScheme[ThemeColor.Accent3].RGB = Color.FromRGB(131, 172, 121);
            theme.ThemeColorScheme[ThemeColor.Accent4].RGB = Color.FromRGB(254, 191, 102);
            theme.ThemeColorScheme[ThemeColor.Accent5].RGB = Color.FromRGB(219, 112, 87);
            theme.ThemeColorScheme[ThemeColor.Accent6].RGB = Color.FromRGB(165, 115, 137);
            theme.ThemeColorScheme[ThemeColor.Hyperlink].RGB = Color.FromRGB(102, 173, 166);
            theme.ThemeColorScheme[ThemeColor.FollowedHyperlink].RGB = Color.FromRGB(165, 115, 137);
            theme.ThemeFontScheme.Major[FontLanguageIndex.Latin].Name = "Sylfaen";
            theme.ThemeFontScheme.Minor[FontLanguageIndex.Latin].Name = "Sylfaen";

            //Apply the above custom theme.
            workbook.Theme = theme;

            //Set active cell.
            worksheet.Range["B7"].Activate();
           //save to an excel file
   workbook.Save("CustomerProfitabilityAnalysis.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.MovieList" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //------------------Set RowHeight &amp; ColumnWidth----------------
            worksheet.StandardHeight = 43.5;
            worksheet.StandardWidth = 8.43;

            worksheet.Range["1:1"].RowHeight = 171;
            worksheet.Range["2:2"].RowHeight = 12.75;
            worksheet.Range["3:3"].RowHeight = 22.5;
            worksheet.Range["4:7"].RowHeight = 43.75;
            worksheet.Range["A:A"].ColumnWidth = 2.887;
            worksheet.Range["B:B"].ColumnWidth = 8.441;
            worksheet.Range["C:C"].ColumnWidth = 12.777;
            worksheet.Range["D:D"].ColumnWidth = 25.109;
            worksheet.Range["E:E"].ColumnWidth = 12.109;
            worksheet.Range["F:F"].ColumnWidth = 41.664;
            worksheet.Range["G:G"].ColumnWidth = 18.555;
            worksheet.Range["H:H"].ColumnWidth = 11;
            worksheet.Range["I:I"].ColumnWidth = 13.664;
            worksheet.Range["J:J"].ColumnWidth = 15.109;
            worksheet.Range["K:K"].ColumnWidth = 38.887;
            worksheet.Range["L:L"].ColumnWidth = 2.887;


            //------------------------Set Table Values-------------------
            ITable table = worksheet.Tables.Add(worksheet.Range["B3:K7"], true);
            worksheet.Range["B3:K7"].Value = new object[,]
            {
                { "NO.", "YEAR", "TITLE", "REVIEW", "STARRING ACTORS", "DIRECTOR", "GENRE", "RATING", "FORMAT", "COMMENTS" },
                { 1, 1994, "Forrest Gump", "5 Stars", "Tom Hanks, Robin Wright, Gary Sinise", "Robert Zemeckis", "Drama", "PG-13", "DVD", "Based on the 1986 novel of the same name by Winston Groom" },
                { 2, 1946, "It’s a Wonderful Life", "2 Stars", "James Stewart, Donna Reed, Lionel Barrymore ", "Frank Capra", "Drama", "G", "VHS", "Colorized version" },
                { 3, 1988, "Big", "4 Stars", "Tom Hanks, Elizabeth Perkins, Robert Loggia ", "Penny Marshall", "Comedy", "PG", "DVD", "" },
                { 4, 1954, "Rear Window", "3 Stars", "James Stewart, Grace Kelly, Wendell Corey ", "Alfred Hitchcock", "Suspense", "PG", "Blu-ray", "" },
            };


            //-----------------------Set Table style--------------------
            ITableStyle tableStyle = workbook.TableStyles.Add("Movie List");
            workbook.DefaultTableStyle = "Movie List";

            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Interior.Color = Color.White;

            tableStyle.TableStyleElements[TableStyleElementType.FirstRowStripe].Interior.Color = Color.FromRGB(38, 38, 38);

            tableStyle.TableStyleElements[TableStyleElementType.SecondRowStripe].Interior.Color = Color.Black;

            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Font.Color = Color.Black;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders.Color = Color.FromRGB(38, 38, 38);
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Interior.Color = Color.FromRGB(68, 217, 255);
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Thick;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.None;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.None;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.None;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.InsideVertical].LineStyle = BorderLineStyle.None;


            //--------------------------------Set Named Styles---------------------
            IStyle movieListBorderStyle = workbook.Styles.Add("Movie list border");
            movieListBorderStyle.IncludeNumber = true;
            movieListBorderStyle.IncludeAlignment = true;
            movieListBorderStyle.VerticalAlignment = VerticalAlignment.Center;
            movieListBorderStyle.WrapText = true;
            movieListBorderStyle.IncludeFont = true;
            movieListBorderStyle.Font.Name = "Franklin Gothic Medium";
            movieListBorderStyle.Font.Size = 11;
            movieListBorderStyle.Font.Color = Color.White;
            movieListBorderStyle.IncludeBorder = true;
            movieListBorderStyle.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
            movieListBorderStyle.Borders[BordersIndex.EdgeBottom].Color = Color.FromRGB(38, 38, 38);
            movieListBorderStyle.IncludePatterns = true;
            movieListBorderStyle.Interior.Color = Color.FromRGB(238, 219, 78);

            IStyle nOStyle = workbook.Styles.Add("NO.");
            nOStyle.IncludeNumber = true;
            nOStyle.IncludeAlignment = true;
            nOStyle.HorizontalAlignment = HorizontalAlignment.Left;
            nOStyle.VerticalAlignment = VerticalAlignment.Center;
            nOStyle.IncludeFont = true;
            nOStyle.Font.Name = "Franklin Gothic Medium";
            nOStyle.Font.Size = 11;
            nOStyle.Font.Color = Color.White;
            nOStyle.IncludeBorder = true;
            nOStyle.IncludePatterns = true;
            nOStyle.Interior.Color = Color.FromRGB(38, 38, 38);

            IStyle reviewStyle = workbook.Styles.Add("Review");
            reviewStyle.IncludeNumber = true;
            reviewStyle.IncludeAlignment = true;
            reviewStyle.VerticalAlignment = VerticalAlignment.Center;
            reviewStyle.IncludeFont = true;
            reviewStyle.Font.Name = "Franklin Gothic Medium";
            reviewStyle.Font.Size = 11;
            reviewStyle.Font.Color = Color.White;
            reviewStyle.IncludeBorder = true;
            reviewStyle.IncludePatterns = true;
            reviewStyle.Interior.Color = Color.FromRGB(38, 38, 38);

            IStyle yearStyle = workbook.Styles.Add("Year");
            yearStyle.IncludeNumber = true;
            yearStyle.IncludeAlignment = true;
            yearStyle.HorizontalAlignment = HorizontalAlignment.Left;
            yearStyle.VerticalAlignment = VerticalAlignment.Center;
            yearStyle.IncludeFont = true;
            yearStyle.Font.Name = "Franklin Gothic Medium";
            yearStyle.Font.Size = 11;
            yearStyle.Font.Color = Color.White;
            yearStyle.IncludeBorder = true;
            yearStyle.IncludePatterns = true;
            yearStyle.Interior.Color = Color.FromRGB(38, 38, 38);

            IStyle heading1Style = workbook.Styles["Heading 1"];
            heading1Style.IncludeAlignment = true;
            heading1Style.VerticalAlignment = VerticalAlignment.Bottom;
            heading1Style.IncludeBorder = true;
            heading1Style.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
            heading1Style.Borders[BordersIndex.EdgeBottom].Color = Color.FromRGB(68, 217, 255);
            heading1Style.IncludeFont = true;
            heading1Style.Font.Name = "Franklin Gothic Medium";
            heading1Style.Font.Bold = false;
            heading1Style.Font.Size = 12;
            heading1Style.Font.Color = Color.Black;

            IStyle normalStyle = workbook.Styles["Normal"];
            normalStyle.IncludeNumber = true;
            normalStyle.IncludeAlignment = true;
            normalStyle.VerticalAlignment = VerticalAlignment.Center;
            normalStyle.WrapText = true;
            normalStyle.IncludeFont = true;
            normalStyle.Font.Name = "Franklin Gothic Medium";
            normalStyle.Font.Size = 11;
            normalStyle.Font.Color = Color.White;
            normalStyle.IncludePatterns = true;
            normalStyle.Interior.Color = Color.FromRGB(38, 38, 38);


            //-----------------------------Use NamedStyle--------------------------
            worksheet.SheetView.DisplayGridlines = false;
            worksheet.TabColor = Color.FromRGB(38, 38, 38);
            table.TableStyle = tableStyle;

            worksheet.Range["A2:L2"].Style = movieListBorderStyle;
            worksheet.Range["B3:K3"].Style = heading1Style;
            worksheet.Range["B4:B7"].Style = nOStyle;
            worksheet.Range["C4:C7"].Style = yearStyle;
            worksheet.Range["E4:E7"].Style = reviewStyle;
            worksheet.Range["F4:F7"].IndentLevel = 1;
            worksheet.Range["F4:F7"].HorizontalAlignment = HorizontalAlignment.Left;


            //-----------------------------Add Shapes------------------------------
            //Movie picture
            var assembly = this.GetType().GetTypeInfo().Assembly;
            System.IO.Stream stream = assembly.GetManifestResourceStream("GrapeCity.Documents.Spread.Examples.Resource.movie.png");
            IShape pictureShape = worksheet.Shapes.AddPicture(stream, ImageType.PNG, 0, 1, worksheet.Range["A:L"].Width, worksheet.Range["1:1"].Height - 1.5);
            pictureShape.Placement = Placement.Move;

            //Movie list picture
            var assembly2 = this.GetType().GetTypeInfo().Assembly;
            System.IO.Stream stream2 = assembly2.GetManifestResourceStream("GrapeCity.Documents.Spread.Examples.Resource.list.png");
            IShape pictureShape2 = worksheet.Shapes.AddPicture(stream2, ImageType.PNG, 1, 0.8, 325.572, 85.51);
            pictureShape2.Placement = Placement.Move;

            //Rounded Rectangular Callout 7
            IShape roundedRectangular = worksheet.Shapes.AddShape(AutoShapeType.RoundedRectangularCallout, 437.5, 22.75, 342, 143);
            roundedRectangular.Name = "Rounded Rectangular Callout 7";
            roundedRectangular.Placement = Placement.Move;
            roundedRectangular.TextFrame.TextRange.Font.Name = "Franklin Gothic Medium";
            roundedRectangular.TextFrame.TextRange.Font.Color.RGB = Color.FromRGB(38, 38, 38);

            roundedRectangular.Fill.Solid();
            roundedRectangular.Fill.Color.RGB = Color.FromRGB(68, 217, 255);
            roundedRectangular.Fill.Transparency = 0;
            roundedRectangular.Line.Solid();
            roundedRectangular.Line.Color.RGB = Color.FromRGB(0, 129, 162);
            roundedRectangular.Line.Weight = 2;
            roundedRectangular.Line.Transparency = 0;

            ITextRange roundedRectangular_p0 = roundedRectangular.TextFrame.TextRange.Paragraphs[0];
            roundedRectangular_p0.Runs.Font.Bold = true;
            roundedRectangular_p0.Runs.Add("TABLE");
            roundedRectangular_p0.Runs.Add(" TIP");

            roundedRectangular.TextFrame.TextRange.Paragraphs.Add("");

            ITextRange roundedRectangular_p2 = roundedRectangular.TextFrame.TextRange.Paragraphs.Add();
            roundedRectangular_p2.Runs.Add("Use the drop down arrows in the table headings to quickly filter your movie list. " +
                "For multiple entry fields, such as Starring Actors,  select the drop down arrow next to the field and enter text in the Search box. " +
                "For example, type Tom Hanks or James Stewart, and then select OK.");

            roundedRectangular.TextFrame.TextRange.Paragraphs.Add("");

            ITextRange roundedRectangular_p4 = roundedRectangular.TextFrame.TextRange.Paragraphs.Add();
            roundedRectangular_p4.Runs.Add("To delete this note, click the edge to select it and then press ");
            roundedRectangular_p4.Runs.Add("Delete");
            roundedRectangular_p4.Runs.Add(".");
            roundedRectangular_p4.Runs[2].Font.Bold = true;

            roundedRectangular.TextFrame.TextRange.Paragraphs.Add("");

            //Add Stright Line Shape
            IShape lineShape = worksheet.Shapes.AddConnector(ConnectorType.Straight, 455.228f, 57.35f, 756.228f, 57.35f);
            lineShape.Line.Solid();
            lineShape.Line.Weight = 3;
            lineShape.Line.Color.RGB = Color.FromRGB(38, 38, 38);
            lineShape.Line.DashStyle = LineDashStyle.SysDot;
           //save to an excel file
   workbook.Save("MovieList.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.PersonalAddressBook" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();


            IWorksheet worksheet = workbook.Worksheets[0];


            
            //***************************Set RowHeight &amp; Width****************************
                worksheet.StandardHeight = 30;
                worksheet.Range["3:4"].RowHeight = 30.25;
                worksheet.Range["1:1"].RowHeight = 103.50;
                worksheet.Range["2:2"].RowHeight = 38.25;
                worksheet.Range["A:A"].ColumnWidth = 2.625;
                worksheet.Range["B:B"].ColumnWidth = 22.25;
                worksheet.Range["C:E"].ColumnWidth = 17.25;
                worksheet.Range["F:F"].ColumnWidth = 31.875;
                worksheet.Range["G:G"].ColumnWidth = 22.625;
                worksheet.Range["H:H"].ColumnWidth = 30;
                worksheet.Range["I:I"].ColumnWidth = 20.25;
                worksheet.Range["J:J"].ColumnWidth = 17.625;
                worksheet.Range["K:K"].ColumnWidth = 12.625;
                worksheet.Range["L:L"].ColumnWidth = 37.25;
                worksheet.Range["M:M"].ColumnWidth = 2.625;

            

            //*******************************Set Table Value &amp; Formulas*************************************
            ITable table = worksheet.Tables.Add(worksheet.Range["B2:L4"], true);
            worksheet.Range["B2:L4"].Value = new object[,]
            {
                { "NAME", "WORK", "CELL", "HOME", "EMAIL", "BIRTHDAY", "ADDRESS", "CITY", "STATE", "ZIP", "NOTE" },
                { "Kim Abercrombie", 1235550123, 1235550123, 1235550123, "someone@example.com", null, "123 N. Maple", "Cherryville", "WA", 98031, "" },
                { "John Smith", 3215550123, "", "", "someone@example.com", null, "456 E. Aspen", "", "", "", "" },
            };
            worksheet.Range["B1"].Value = "ADDRESS BOOK";
            worksheet.Range["G3"].Formula = "=TODAY()";
            worksheet.Range["G4"].Formula = "=TODAY()+5";

            

            //****************************Set Table Style********************************
            ITableStyle tableStyle = workbook.TableStyles.Add("Personal Address Book");
            workbook.DefaultTableStyle = "Personal Address Book";

            //Set WholeTable element style.
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders.Color = Color.FromRGB(179, 35, 23);
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideVertical].LineStyle = BorderLineStyle.Thin;
            tableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Thin;

            //Set FirstColumn element style.
            tableStyle.TableStyleElements[TableStyleElementType.FirstColumn].Font.Bold = true;

            //Set SecondColumns element style.
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders.Color = Color.FromRGB(179, 35, 23);
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Thick;
            tableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
            


            //***********************************Set Named Styles*****************************
            IStyle normalStyle = workbook.Styles["Normal"];
            normalStyle.Font.Name = "Arial";
            normalStyle.Font.Color = Color.FromRGB(179, 35, 23);
            normalStyle.HorizontalAlignment = HorizontalAlignment.Left;
            normalStyle.IndentLevel = 1;
            normalStyle.VerticalAlignment = VerticalAlignment.Center;
            normalStyle.WrapText = true;

            IStyle titleStyle = workbook.Styles["Title"];
            titleStyle.IncludeAlignment = true;
            titleStyle.HorizontalAlignment = HorizontalAlignment.Left;
            titleStyle.VerticalAlignment = VerticalAlignment.Center;
            titleStyle.Font.Name = "Arial";
            titleStyle.Font.Bold = true;
            titleStyle.Font.Size = 72;
            titleStyle.Font.Color = Color.FromRGB(179, 35, 23);

            IStyle heading1Style = workbook.Styles["Heading 1"];
            heading1Style.IncludeBorder = false;
            heading1Style.Font.Name = "Arial";
            heading1Style.Font.Size = 18;
            heading1Style.Font.Color = Color.FromRGB(179, 35, 23);

            IStyle dataStyle = workbook.Styles.Add("Data");
            dataStyle.IncludeNumber = true;
            dataStyle.NumberFormat = "m/d/yyyy";

            IStyle phoneStyle = workbook.Styles.Add("Phone");
            phoneStyle.IncludeNumber = true;
            phoneStyle.NumberFormat = "[&lt;=9999999]###-####;(###) ###-####";



            //****************************************Use NamedStyle**************************
            worksheet.SheetView.DisplayGridlines = false;
            worksheet.Range["B2:L2"].Interior.Color = Color.FromRGB(217, 217, 217);
            worksheet.Range["B3:B4"].Font.Bold = true;
            worksheet.Range["2:2"].HorizontalAlignment = HorizontalAlignment.Left;

            table.TableStyle = tableStyle;
            worksheet.Range["B1"].Style = titleStyle;
            worksheet.Range["B2:L2"].Style = heading1Style;
            worksheet.Range["C3:E4"].Style = phoneStyle;
            worksheet.Range["G3:G4"].Style = dataStyle;

           //save to an excel file
   workbook.Save("PersonalAddressBook.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.PersonalNetWorthCalculator" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //-------------------------Set RowHeight &amp; Width-----------------------------------
            worksheet.StandardHeight = 30;
            worksheet.StandardWidth = 8.43;

            worksheet.Range["1:1"].RowHeight = 278.25;
            worksheet.Range["2:4"].RowHeight = 30.25;
            worksheet.Range["8:8"].RowHeight = 55.5;
            worksheet.Range["9:30"].RowHeight = 30.25;
            worksheet.Range["33:33"].RowHeight = 55.5;
            worksheet.Range["34:44"].RowHeight = 43.5;
            worksheet.Range["A:A"].ColumnWidth = 2.777;
            worksheet.Range["B:B"].ColumnWidth = 32.887;
            worksheet.Range["C:C"].ColumnWidth = 24.219;
            worksheet.Range["D:D"].ColumnWidth = 10.109;
            worksheet.Range["E:E"].ColumnWidth = 61.332;
            worksheet.Range["F:F"].ColumnWidth = 2.777;


            //-------------------------Set Table Value &amp; Formulas-------------------------------
            ITable assetsTable = worksheet.Tables.Add(worksheet.Range["B9:D30"], true);
            assetsTable.Name = "Assets";
            worksheet.Range["B8"].Value = "Assets";
            worksheet.Range["B9:D30"].Value = new object[,]
            {
                { "Category", "Item", "Value" },
                { "Real Estate", "Home", 560000 },
                { "Real Estate", "Other", 255000 },
                { "Investments", "Retirement accounts", 98000 },
                { "Investments", "Stocks", 53000 },
                { "Investments", "Bonds", 25000 },
                { "Investments", "Mutual funds", 33000 },
                { "Investments", "CDs", 74000 },
                { "Investments", "Bullion", 20000 },
                { "Investments", "Trust funds", 250000 },
                { "Investments", "Health savings account", 18000 },
                { "Investments", "Face value of life insurance policy", 85000 },
                { "Investments", "Other", 20000 },
                { "Cash", "Checking accounts", 14500 },
                { "Cash", "Savings accounts", 5000 },
                { "Cash", "Other", 2000 },
                { "Personal Property", "Cars", 55000 },
                { "Personal Property", "Other vehicles", 85000 },
                { "Personal Property", "Furnishings", 100000 },
                { "Personal Property", "Collectibles", 50000 },
                { "Personal Property", "Jewelry", 60000 },
                { "Personal Property", "Other luxury goods", 40000 },
            };

            ITable debtsTable = worksheet.Tables.Add(worksheet.Range["B34:C44"], true);
            debtsTable.Name = "Debts";
            worksheet.Range["B33"].Value = "Debts";
            worksheet.Range["B34:C44"].Value = new object[,]
            {
                { "Category", "Value" },
                { "Mortgages", 400000 },
                { "Home equity loans", 50000 },
                { "Car loans", 30000 },
                { "Personal loans", 0 },
                { "Credit cards", 0 },
                { "Student loans", 10000 },
                { "Loans against investments", 20000 },
                { "Life insurance loans", 5000 },
                { "Other installment loans", 10000 },
                { "Other debts", 50000 },
            };

            worksheet.Range["B1:C1"].Merge();
            worksheet.Range["B1"].Value = "Personal\r\nNet\r\nWorth";
            worksheet.Range["B2"].Formula = "=\"Total \"&amp;TotalAssetsLabel";
            worksheet.Range["B3"].Formula = "=\"Total \"&amp;TotalDebtsLabel";
            worksheet.Range["B4"].Formula = "=NetWorthLabel";
            worksheet.Range["C2"].Formula = "=TotalAssets";
            worksheet.Range["C3"].Formula = "=TotalDebts";
            worksheet.Range["C4"].Formula = "=NetWorth";

            worksheet.Names.Add("TotalAssets", "=SUM(Assets[Value])");
            worksheet.Names.Add("TotalDebts", "=SUM(Debts[Value])");
            worksheet.Names.Add("NetWorth", "=TotalAssets-TotalDebts");
            worksheet.Names.Add("TotalAssetsLabel", "=Sheet1!$B$8");
            worksheet.Names.Add("TotalDebtsLabel", "=Sheet1!$B$33");
            worksheet.Names.Add("NetWorthLabel", "=\"Net Worth\"");


            //---------------------------Set Table Style---------------------------
            ITableStyle assetsTableStyle = workbook.TableStyles.Add("Assets");
            workbook.DefaultTableStyle = "Assets";
            assetsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Font.Color = Color.FromRGB(64, 64, 64);
            assetsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders.Color = Color.FromRGB(128, 128, 128);
            assetsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Dotted;
            assetsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            assetsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.None;
            assetsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.None;
            assetsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.None;
            assetsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideVertical].LineStyle = BorderLineStyle.None;

            assetsTableStyle.TableStyleElements[TableStyleElementType.SecondRowStripe].Interior.Color = Color.White;
            assetsTableStyle.TableStyleElements[TableStyleElementType.SecondRowStripe].StripeSize = 1;

            assetsTableStyle.TableStyleElements[TableStyleElementType.LastColumn].Font.Bold = true;
            assetsTableStyle.TableStyleElements[TableStyleElementType.LastColumn].Font.Color = Color.FromRGB(61, 125, 137);
            assetsTableStyle.TableStyleElements[TableStyleElementType.LastColumn].Interior.Color = Color.White;

            assetsTableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Interior.Color = Color.FromRGB(61, 125, 137);


            ITableStyle debtsTableStyle = workbook.TableStyles.Add("Debts");
            debtsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Font.Color = Color.FromRGB(64, 64, 64);
            debtsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders.Color = Color.FromRGB(128, 128, 128);
            debtsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Dotted;
            debtsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            debtsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.None;
            debtsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.None;
            debtsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.None;
            debtsTableStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideVertical].LineStyle = BorderLineStyle.None;

            debtsTableStyle.TableStyleElements[TableStyleElementType.SecondRowStripe].Interior.Color = Color.White;
            debtsTableStyle.TableStyleElements[TableStyleElementType.SecondRowStripe].StripeSize = 1;

            debtsTableStyle.TableStyleElements[TableStyleElementType.LastColumn].Font.Bold = true;
            debtsTableStyle.TableStyleElements[TableStyleElementType.LastColumn].Font.Color = Color.FromRGB(146, 75, 12);
            debtsTableStyle.TableStyleElements[TableStyleElementType.LastColumn].Interior.Color = Color.White;

            debtsTableStyle.TableStyleElements[TableStyleElementType.HeaderRow].Interior.Color = Color.FromRGB(218, 113, 18);


            //----------------------------Set Named Styles-------------------------
            IStyle normalStyle = workbook.Styles["Normal"];
            normalStyle.Font.Name = "Century Gothic";
            normalStyle.Font.Size = 12;
            normalStyle.Font.Color = Color.FromRGB(64, 64, 64);
            normalStyle.Interior.Color = Color.FromRGB(243, 243, 236);
            normalStyle.Interior.PatternColor = Color.FromRGB(243, 243, 236);
            normalStyle.HorizontalAlignment = HorizontalAlignment.Left;
            normalStyle.IndentLevel = 1;
            normalStyle.VerticalAlignment = VerticalAlignment.Center;
            normalStyle.WrapText = true;

            IStyle titleStyle = workbook.Styles["Title"];
            titleStyle.IncludeAlignment = true;
            titleStyle.VerticalAlignment = VerticalAlignment.Center;
            titleStyle.WrapText = true;
            titleStyle.Font.Name = "Century Gothic";
            titleStyle.Font.Size = 66;
            titleStyle.Font.Color = Color.FromRGB(64, 64, 64);
            titleStyle.IncludePatterns = true;
            titleStyle.Interior.Color = Color.FromRGB(243, 243, 236);

            IStyle heading1Style = workbook.Styles["Heading 1"];
            heading1Style.IncludeAlignment = true;
            heading1Style.HorizontalAlignment = HorizontalAlignment.Left;
            heading1Style.IndentLevel = 4;
            heading1Style.VerticalAlignment = VerticalAlignment.Center;
            heading1Style.Font.Name = "Century Gothic";
            heading1Style.Font.Bold = false;
            heading1Style.Font.Size = 16;
            heading1Style.Font.Color = Color.FromRGB(64, 64, 64);
            heading1Style.IncludeBorder = false;
            heading1Style.IncludePatterns = true;
            heading1Style.Interior.Color = Color.FromRGB(243, 243, 236);

            IStyle heading2Style = workbook.Styles["Heading 2"];
            heading2Style.IncludeNumber = true;
            heading2Style.NumberFormat = "$#,##0";
            heading2Style.IncludeAlignment = true;
            heading2Style.HorizontalAlignment = HorizontalAlignment.Right;
            heading2Style.IndentLevel = 2;
            heading2Style.VerticalAlignment = VerticalAlignment.Center;
            heading2Style.Font.Name = "Century Gothic";
            heading2Style.Font.Size = 16;
            heading2Style.Font.Color = Color.FromRGB(64, 64, 64);
            heading2Style.IncludeBorder = false;
            heading2Style.IncludePatterns = true;
            heading2Style.Interior.Color = Color.FromRGB(243, 243, 236);

            IStyle heading3Style = workbook.Styles["Heading 3"];
            heading3Style.IncludeAlignment = true;
            heading3Style.HorizontalAlignment = HorizontalAlignment.Left;
            heading3Style.VerticalAlignment = VerticalAlignment.Bottom;
            heading3Style.IncludeBorder = false;
            heading3Style.Font.Name = "Century Gothic";
            heading3Style.Font.Bold = false;
            heading3Style.Font.Size = 27;
            heading3Style.Font.Color = Color.FromRGB(64, 64, 64);
            heading3Style.IncludePatterns = true;
            heading3Style.Interior.Color = Color.FromRGB(243, 243, 236);

            IStyle heading4Style = workbook.Styles["Heading 4"];
            heading4Style.Font.Name = "Century Gothic";
            heading4Style.Font.Size = 16;
            heading4Style.Font.Color = Color.White;
            heading4Style.Font.Bold = false;

            IStyle currencyStyle = workbook.Styles["Currency"];
            currencyStyle.NumberFormat = "$#,##0";
            currencyStyle.IncludeAlignment = true;
            currencyStyle.HorizontalAlignment = HorizontalAlignment.Right;
            currencyStyle.IndentLevel = 1;
            currencyStyle.VerticalAlignment = VerticalAlignment.Center;
            currencyStyle.IncludeFont = true;
            currencyStyle.Font.Bold = true;
            currencyStyle.Font.Name = "Century Gothic";
            currencyStyle.Font.Size = 12;


            //----------------------------------Use Style---------------------------
            assetsTable.TableStyle = assetsTableStyle;
            debtsTable.TableStyle = debtsTableStyle;

            worksheet.SheetView.DisplayGridlines = false;
            worksheet.Range["B2:B4"].Style = heading1Style;
            worksheet.Range["C2:C4"].Style = heading2Style;
            worksheet.Range["B9:D9"].Style = heading4Style;
            worksheet.Range["D10:D30"].Style = currencyStyle;
            worksheet.Range["D10:D30"].Font.Color = Color.FromRGB(61, 125, 137);

            worksheet.Range["B34:C34"].Style = heading4Style;
            worksheet.Range["C35:C44"].Style = currencyStyle;
            worksheet.Range["C35:C44"].Font.Color = Color.FromRGB(218, 113, 18);
            worksheet.Range["B1"].Style = titleStyle;
            worksheet.Range["B8"].Style = heading3Style;
            worksheet.Range["B33"].Style = heading3Style;

            worksheet.Range["B3:C3"].Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Hair;
            worksheet.Range["B3:C3"].Borders[BordersIndex.EdgeTop].Color = Color.FromRGB(128, 128, 128);
            worksheet.Range["B3:C3"].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Hair;
            worksheet.Range["B3:C3"].Borders[BordersIndex.EdgeBottom].Color = Color.FromRGB(128, 128, 128);


            //--------------------------------Add Shape--------------------------------
            IShape recShape1 = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 17.81, 282.75, 20.963, 21.75);
            recShape1.Line.Color.ColorType = SolidColorType.None;
            recShape1.Fill.Color.RGB= Color.FromRGB(60, 126, 138);
            IShape recShape2 = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 17.81, 312.75, 20.963, 21.75);
            recShape2.Line.Color.ColorType = SolidColorType.None;
            recShape2.Fill.Color.RGB = Color.FromRGB(218, 118, 13);
            IShape recShape3 = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 17.81, 342.75, 20.963, 21.75);
            recShape3.Line.Color.ColorType = SolidColorType.None;
            recShape3.Fill.Color.RGB = Color.FromRGB(84, 138, 57);

            IShape pieShape = worksheet.Shapes.AddChart(ChartType.Pie, 442.5, 26.25, 346, 350.25);
            pieShape.Chart.HasLegend = false;
            pieShape.Chart.HasTitle = false;
            pieShape.Chart.ChartGroups[0].FirstSliceAngle = 180;
            pieShape.Placement = Placement.Move;

            IChartArea chartArea = pieShape.Chart.ChartArea;
            chartArea.Format.Fill.Transparency = 1;
            chartArea.Format.Line.Transparency = 1;

            ISeries chartSeries = pieShape.Chart.SeriesCollection.NewSeries();
            chartSeries.Formula = "=SERIES('Sheet1'!$B$2:$B$4,,'Sheet1'!$C$2:$C$4,1)";

            chartSeries.HasDataLabels = true;
            chartSeries.DataLabels.Font.Name = "Century Gothic";
            chartSeries.DataLabels.Font.Size = 20;
            chartSeries.DataLabels.Font.Bold = true;
            chartSeries.DataLabels.Font.Color.RGB = Color.White;
            chartSeries.DataLabels.ShowValue = false;
            chartSeries.DataLabels.ShowPercentage = true;
            chartSeries.DataLabels.Position = DataLabelPosition.Center;

            chartSeries.Points[0].Format.Fill.Color.RGB = Color.FromRGB(60, 126, 138);
            chartSeries.Points[1].Format.Fill.Color.RGB = Color.FromRGB(218, 118, 13);
            chartSeries.Points[2].Format.Fill.Color.RGB = Color.FromRGB(84, 138, 57);
            chartSeries.Explosion = 1;

           //save to an excel file
   workbook.Save("PersonalNetWorthCalculator.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelReporting.ToDoListWithProgressTracker" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                { "TASK", "PRIORITY", "STATUS", "START DATE", "DUE DATE","% COMPLETE", "DONE?", "NOTES" },
                { "First Thing I Need To Do", "Normal", "Not Started", null, null, 0, null, null },
                { "Other Thing I Need To Finish", "High", "In Progress", null , null, 0.5, null, null},
                { "Something Else To Get Done", "Low", "Complete",null, null, 1, null, null },
                { "More Errands And Things", "Normal", "In Progress", null, null, 0.75, null, null },
                { "So Much To Get Done This Week", "High", "In Progress", null, null, 0.25, null, null }
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Name = "To-Do List";
            worksheet.TabColor = Color.FromRGB(148, 112, 135);
            worksheet.SheetView.DisplayGridlines = false;

            //Set Value.
            worksheet.Range["B1"].Value = "To-Do List";
            worksheet.Range["B2:I7"].Value = data;

            //Set formula.
            worksheet.Range["E3"].Formula = "=TODAY()";
            worksheet.Range["E4"].Formula = "=TODAY()-30";
            worksheet.Range["E5"].Formula = "=TODAY()-23";
            worksheet.Range["E6"].Formula = "=TODAY()-15";
            worksheet.Range["E7"].Formula = "=TODAY()-5";

            //Change the range's RowHeight and ColumnWidth.
            worksheet.StandardHeight = 30;
            worksheet.StandardWidth = 8.88671875;
            worksheet.Range["1:1"].RowHeight = 72.75;
            worksheet.Range["2:2"].RowHeight = 33;
            worksheet.Range["3:7"].RowHeight = 30.25;
            worksheet.Range["A:A"].ColumnWidth = 2.77734375;
            worksheet.Range["B:B"].ColumnWidth = 29.109375;
            worksheet.Range["C:G"].ColumnWidth = 16.77734375;
            worksheet.Range["H:H"].ColumnWidth = 10.77734375;
            worksheet.Range["I:I"].ColumnWidth = 29.6640625;
            worksheet.Range["J:J"].ColumnWidth = 2.77734375;

            //Modify the build in name styles.
            var nameStyle_Normal = workbook.Styles["Normal"];
            nameStyle_Normal.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Normal.WrapText = true;
            nameStyle_Normal.Font.ThemeFont = ThemeFont.Minor;
            nameStyle_Normal.Font.ThemeColor = ThemeColor.Dark1;
            nameStyle_Normal.Font.TintAndShade = 0.25;

            var nameStyle_Title = workbook.Styles["Title"];
            nameStyle_Title.HorizontalAlignment = HorizontalAlignment.General;
            nameStyle_Title.VerticalAlignment = VerticalAlignment.Bottom;
            nameStyle_Title.Font.ThemeFont = ThemeFont.Minor;
            nameStyle_Title.Font.Bold = true;
            nameStyle_Title.Font.Size = 38;
            nameStyle_Title.Font.ThemeColor = ThemeColor.Dark1;
            nameStyle_Title.Font.TintAndShade = 0.249946592608417;
            nameStyle_Title.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
            nameStyle_Title.Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Dark1;
            nameStyle_Title.IncludeAlignment = true;
            nameStyle_Title.IncludeBorder = true;

            var nameStyle_Percent = workbook.Styles["Percent"];
            nameStyle_Percent.HorizontalAlignment = HorizontalAlignment.Right;
            nameStyle_Percent.IndentLevel = 1;
            nameStyle_Percent.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Percent.IncludeAlignment = true;

            var nameStyle_Heading_1 = workbook.Styles["Heading 1"];
            nameStyle_Heading_1.HorizontalAlignment = HorizontalAlignment.Left;
            nameStyle_Heading_1.VerticalAlignment = VerticalAlignment.Bottom;
            nameStyle_Heading_1.Font.ThemeFont = ThemeFont.Major;
            nameStyle_Heading_1.Font.Bold = false;
            nameStyle_Heading_1.Font.Size = 11;
            nameStyle_Heading_1.Font.ThemeColor = ThemeColor.Dark1;
            nameStyle_Heading_1.Font.TintAndShade = 0.249946592608417;
            nameStyle_Heading_1.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            nameStyle_Heading_1.IncludeNumber = true;
            nameStyle_Heading_1.IncludeAlignment = true;
            nameStyle_Heading_1.IncludeBorder = false;

            var nameStyle_Heading_2 = workbook.Styles["Heading 2"];
            nameStyle_Heading_2.HorizontalAlignment = HorizontalAlignment.Right;
            nameStyle_Heading_2.IndentLevel = 2;
            nameStyle_Heading_2.VerticalAlignment = VerticalAlignment.Bottom;
            nameStyle_Heading_2.Font.ThemeFont = ThemeFont.Major;
            nameStyle_Heading_2.Font.Bold = false;
            nameStyle_Heading_2.Font.Size = 11;
            nameStyle_Heading_2.Font.ThemeColor = ThemeColor.Dark2;
            nameStyle_Heading_2.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.None;
            nameStyle_Heading_2.IncludeNumber = true;
            nameStyle_Heading_2.IncludeAlignment = true;

            //Create custom name styes.
            IStyle nameStyle_Done = workbook.Styles.Add("Done");
            nameStyle_Done.NumberFormat = "\"Done\";\"\";\"\"";
            nameStyle_Done.HorizontalAlignment = HorizontalAlignment.Center;
            nameStyle_Done.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Done.Font.ThemeFont = ThemeFont.Minor;
            nameStyle_Done.Font.ThemeColor = ThemeColor.Light1;

            IStyle nameStyle_Date = workbook.Styles.Add("Date");
            nameStyle_Date.NumberFormat = "yyyy/m/d";
            nameStyle_Date.HorizontalAlignment = HorizontalAlignment.Right;
            nameStyle_Date.VerticalAlignment = VerticalAlignment.Center;
            nameStyle_Date.Font.ThemeFont = ThemeFont.Minor;
            nameStyle_Date.Font.ThemeColor = ThemeColor.Dark1;
            nameStyle_Date.Font.TintAndShade = 0.249946592608417;
            nameStyle_Date.IncludeBorder = false;
            nameStyle_Date.IncludePatterns = false;

            //Apply the above name styles on ranges.
            worksheet.Range["B1:I1"].Style = workbook.Styles["Title"];
            worksheet.Range["B2:D2"].Style = workbook.Styles["Heading 1"];
            worksheet.Range["E2:F2"].Style = workbook.Styles["Heading 2"];
            worksheet.Range["G2"].Style = workbook.Styles["Heading 1"];
            worksheet.Range["H2:H7"].Style = workbook.Styles["Done"];
            worksheet.Range["I2"].Style = workbook.Styles["Heading 1"];
            worksheet.Range["E3:F7"].Style = workbook.Styles["Date"];
            worksheet.Range["G3:G7"].Style = workbook.Styles["Percent"];

            //Add one custom table style.
            ITableStyle style = workbook.TableStyles.Add("To-do List");
            style.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
            style.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Light1;
            style.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.EdgeBottom].TintAndShade = -0.14993743705557422;
            style.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Thin;
            style.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].ThemeColor = ThemeColor.Light1;
            style.TableStyleElements[TableStyleElementType.WholeTable].Borders[BordersIndex.InsideHorizontal].TintAndShade = -0.14993743705557422;

            //Create a table and apply the above table style.
            ITable table = worksheet.Tables.Add(worksheet.Range["B2:I7"], true);
            table.Name = "ToDoList";
            table.TableStyle = style;

            //Use table formula in table range.
            worksheet.Range["F3"].Formula = "=[@[START DATE]]+7";
            worksheet.Range["F4"].Formula = "=[@[START DATE]]+35";
            worksheet.Range["F5"].Formula = "=[@[START DATE]]+10";
            worksheet.Range["F6"].Formula = "=[@[START DATE]]+36";
            worksheet.Range["F7"].Formula = "=[@[START DATE]]+14";
            worksheet.Range["H3:H7"].Formula = "=--([@[% COMPLETE]]&gt;=1)";

            //Add a expression rule.
            IFormatCondition expression = worksheet.Range["B3:I7"].FormatConditions.Add(FormatConditionType.Expression, FormatConditionOperator.Between, "=AND($G3=0,$G3&lt;&gt;\"\")", null) as IFormatCondition;
            expression.Interior.ThemeColor = ThemeColor.Light1;
            expression.Interior.TintAndShade = -0.0499893185216834;

            //Add a data bar rule.
            IDataBar dataBar = worksheet.Range["G3:G7"].FormatConditions.AddDatabar();
            dataBar.BarFillType = DataBarFillType.Solid;
            dataBar.BarColor.ThemeColor = ThemeColor.Accent1;
            dataBar.BarColor.TintAndShade = 0.39997558519241921;

            //Add an icon set rule.
            IIconSetCondition iconSet = worksheet.Range["H3:H7"].FormatConditions.AddIconSetCondition();
            iconSet.IconSet = workbook.IconSets[IconSetType.Icon3Symbols];
            iconSet.IconCriteria[2].Operator = FormatConditionOperator.GreaterEqual;
            iconSet.IconCriteria[2].Value = 1;
            iconSet.IconCriteria[2].Type = ConditionValueTypes.Number;
            iconSet.IconCriteria[1].Operator = FormatConditionOperator.GreaterEqual;
            iconSet.IconCriteria[1].Value = 0;
            iconSet.IconCriteria[1].Type = ConditionValueTypes.Number;

            //Add a cell value rule.
            IFormatCondition cellValue = worksheet.Range["H3:H7"].FormatConditions.Add(FormatConditionType.CellValue, FormatConditionOperator.NotEqual, 1) as IFormatCondition;
            cellValue.StopIfTrue = true;

            //Create list validations.
            worksheet.Range["C3:C7"].Validation.Add(ValidationType.List, ValidationAlertStyle.Warning, ValidationOperator.Between, "Low, Normal, High", null);
            IValidation validation = worksheet.Range["C3:C7"].Validation;
            validation.ErrorMessage = "Select entry from the list. Select CANCEL, then press ALT+DOWN ARROW to navigate the list. Select ENTER to make selection";

            worksheet.Range["D3:D7"].Validation.Add(ValidationType.List, ValidationAlertStyle.Warning, ValidationOperator.Between, "Not Started,In Progress, Deferred, Complete", null);
            validation = worksheet.Range["D3:D7"].Validation;
            validation.ErrorMessage = "Select entry from the list. Select CANCEL, then press ALT+DOWN ARROW to navigate the list. Select ENTER to make selection";

            worksheet.Range["G3:G7"].Validation.Add(ValidationType.List, ValidationAlertStyle.Warning, ValidationOperator.Between, "0%,25%,50%,75%,100%", null);
            validation = worksheet.Range["G3:G7"].Validation;
            validation.ErrorMessage = "Select entry from the list. Select CANCEL, then press ALT+DOWN ARROW to navigate the list. Select ENTER to make selection";

            //Create custom validation.
            worksheet.Range["F3:F7"].Validation.Add(ValidationType.Custom, ValidationAlertStyle.Warning, ValidationOperator.Between, "=F3&gt;=E3", null);
            validation = worksheet.Range["F3:F7"].Validation;
            validation.ErrorMessage = "The Due Date must be greater than or equal to the Start Date. Select YES to keep the value, NO to retry or CANCEL to clear the entry";

            //Create none validations, set inputmessage.
            worksheet.Range["B2"].Validation.Add(ValidationType.None, ValidationAlertStyle.Stop, ValidationOperator.Between, null, null);
            validation = worksheet.Range["B2"].Validation;
            validation.InputMessage = "Enter Task in this column under this heading. Use heading filters to find specific entries";

            worksheet.Range["C2"].Validation.Add(ValidationType.None, ValidationAlertStyle.Stop, ValidationOperator.Between, null, null);
            validation = worksheet.Range["C2"].Validation;
            validation.InputMessage = "Select Priority in this column under this heading. Press ALT+DOWN ARROW to open the drop-down list, then ENTER to make selection";

            worksheet.Range["D2"].Validation.Add(ValidationType.None, ValidationAlertStyle.Stop, ValidationOperator.Between, null, null);
            validation = worksheet.Range["D2"].Validation;
            validation.InputMessage = "Select Status in this column under this heading.  Press ALT+DOWN ARROW to open the drop-down list, then ENTER to make selection";

            worksheet.Range["E2"].Validation.Add(ValidationType.None, ValidationAlertStyle.Stop, ValidationOperator.Between, null, null);
            validation = worksheet.Range["E2"].Validation;
            validation.InputMessage = "Enter Start Date in this column under this heading";

            worksheet.Range["F2"].Validation.Add(ValidationType.None, ValidationAlertStyle.Stop, ValidationOperator.Between, null, null);
            validation = worksheet.Range["F2"].Validation;
            validation.InputMessage = "Enter Due Date in this column under this heading";

            worksheet.Range["G2"].Validation.Add(ValidationType.None, ValidationAlertStyle.Stop, ValidationOperator.Between, null, null);
            validation = worksheet.Range["G2"].Validation;
            validation.InputMessage = "Select % Complete in this column. Press ALT+DOWN ARROW to open the drop-down list, then ENTER to make selection. A status bar indicates progress toward completion";

            worksheet.Range["H2"].Validation.Add(ValidationType.None, ValidationAlertStyle.Stop, ValidationOperator.Between, null, null);
            validation = worksheet.Range["H2"].Validation;
            validation.InputMessage = "Icon indicator for task completion in this column under this heading is automatically updated as tasks complete";

            worksheet.Range["I2"].Validation.Add(ValidationType.None, ValidationAlertStyle.Stop, ValidationOperator.Between, null, null);
            validation = worksheet.Range["I2"].Validation;
            validation.InputMessage = "Enter Notes in this column under this heading";

            //Create customize theme.
            Themes themes = new Themes();
            ITheme theme = themes.Add("test");
            theme.ThemeColorScheme[ThemeColor.Dark1].RGB = Color.FromRGB(0, 0, 0);
            theme.ThemeColorScheme[ThemeColor.Light1].RGB = Color.FromRGB(255, 255, 255);
            theme.ThemeColorScheme[ThemeColor.Dark2].RGB = Color.FromRGB(37, 28, 34);
            theme.ThemeColorScheme[ThemeColor.Light2].RGB = Color.FromRGB(240, 248, 246);
            theme.ThemeColorScheme[ThemeColor.Accent1].RGB = Color.FromRGB(148, 112, 135);
            theme.ThemeColorScheme[ThemeColor.Accent2].RGB = Color.FromRGB(71, 166, 181);
            theme.ThemeColorScheme[ThemeColor.Accent3].RGB = Color.FromRGB(234, 194, 53);
            theme.ThemeColorScheme[ThemeColor.Accent4].RGB = Color.FromRGB(107, 192, 129);
            theme.ThemeColorScheme[ThemeColor.Accent5].RGB = Color.FromRGB(233, 115, 61);
            theme.ThemeColorScheme[ThemeColor.Accent6].RGB = Color.FromRGB(251, 147, 59);
            theme.ThemeColorScheme[ThemeColor.Hyperlink].RGB = Color.FromRGB(71, 166, 181);
            theme.ThemeColorScheme[ThemeColor.FollowedHyperlink].RGB = Color.FromRGB(148, 112, 135);
            theme.ThemeFontScheme.Major[FontLanguageIndex.Latin].Name = "Franklin Gothic Medium";
            theme.ThemeFontScheme.Minor[FontLanguageIndex.Latin].Name = "Bookman Old Style";

            //Apply the above custom theme.
            workbook.Theme = theme;

            //Set active cell.
            worksheet.Range["G4"].Activate();
           //save to an excel file
   workbook.Save("ToDoListWithProgressTracker.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelTemplates.BloodSugarTracker" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file Monthly business budget.xlsx from resource
            var fileStream = this.GetTemplateStream("Blood sugar tracker.xlsx");

            workbook.Open(fileStream);

            var worksheet = workbook.ActiveSheet;

            //insert 19 rows  
            worksheet.Range["1:19"].Insert();

            //Change the rows(2~5) RowHeight
            worksheet.Rows[1].RowHeight = 34.5;
            worksheet.Rows[2].RowHeight = 15.75;
            worksheet.Rows[3].RowHeight = 19.5;
            worksheet.Rows[4].RowHeight = 15.75;

            //Set values
            worksheet.Range["B2"].Value = "BLOOD SUGAR TRACKING";
            worksheet.Range["B4"].Value = "CHARTED PROGRESS";

            //Set Styles
            worksheet.Range["B2"].Font.ThemeFont = ThemeFont.Major;
            worksheet.Range["B2"].Font.Size = 26;
            worksheet.Range["B2"].Font.ThemeColor = ThemeColor.Dark1;
            worksheet.Range["B2"].Font.TintAndShade = 0.34998626667073579;
            worksheet.Range["B2:D2"].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
            worksheet.Range["B2:D2"].Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Accent1;

            worksheet.Range["B4"].Font.ThemeFont = ThemeFont.Major;
            worksheet.Range["B4"].Font.Bold = true;
            worksheet.Range["B4"].Font.Size = 14;
            worksheet.Range["B4"].Font.ThemeColor = ThemeColor.Dark1;
            worksheet.Range["B4"].Font.TintAndShade = 0.34998626667073579;
            worksheet.Range["B4:D4"].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
            worksheet.Range["B4:D4"].Borders[BordersIndex.EdgeBottom].ThemeColor = ThemeColor.Accent2;

            //Add chart
            IShape shape = worksheet.Shapes.AddChart(ChartType.Line, 9.75, 100.5, 365, 203.25);
            shape.Name = "BloodSugarProgress";

            //Add Series.
            ISeries series1 = shape.Chart.SeriesCollection.NewSeries();
            series1.Formula = "=SERIES('BLOOD SUGAR DATA'!$C$23,'BLOOD SUGAR DATA'!$B$24:$B$45,'BLOOD SUGAR DATA'!$C$24:$C$45,1)";
            series1.Format.Line.Color.ObjectThemeColor = ThemeColor.Accent1;
            series1.Format.Line.Weight = 2.5;

            ISeries series2 = shape.Chart.SeriesCollection.NewSeries();
            series2.Formula = "=SERIES('BLOOD SUGAR DATA'!$D$23,'BLOOD SUGAR DATA'!$B$24:$B$45,'BLOOD SUGAR DATA'!$D$24:$D$45,2)";
            series2.Format.Line.Color.ObjectThemeColor = ThemeColor.Accent2;
            series2.Format.Line.Weight = 2.5;

            //Hidden the chart title
            shape.Chart.HasTitle = false;

            //Hidden the category axis
            IAxis category_axis = shape.Chart.Axes.Item(AxisType.Category);
            category_axis.Visible = false;

            //Set value axis units
            IAxis value_axis = shape.Chart.Axes.Item(AxisType.Value);
            value_axis.MaximumScale = 140;
            value_axis.MinimumScale = 50;
            value_axis.MajorUnit = 10;
            value_axis.MinorUnit = 2;

            //Add a rectange shape
            IShape shape1 = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 385, 84.75, 102, 218.25);
            shape1.Fill.Solid();
            shape1.Fill.Color.ObjectThemeColor = ThemeColor.Accent1;
            shape1.Fill.Color.Brightness = 0.6;

            //set shape's border to no line
            shape1.Line.Color.ColorType = SolidColorType.None;

            //set shape rich text
            ITextRange shape1_p1 = shape1.TextFrame.TextRange.Paragraphs[0];
            shape1_p1.Text = "INFO:";
            shape1_p1.Runs.Add(" Blood sugar levels will vary from person-to-person.  There are many factors to keeping it within your normal range and isn't based on sugar alone.  Consult a physician for additional information or follow-up.");

            ITextRange shape1_p2 = shape1.TextFrame.TextRange.Paragraphs.Add("");
            ITextRange shape1_p3 = shape1.TextFrame.TextRange.Paragraphs.Add("More info can be found here:");
            ITextRange shape1_p4 = shape1.TextFrame.TextRange.Paragraphs.Add("http://diabetes.webmd.com/blood-glucose");

            shape1.TextFrame.TextRange.Font.Size = 10;
            shape1.TextFrame.TextRange.Font.ThemeFont = ThemeFont.Minor;
            shape1.TextFrame.TextRange.Font.Color.ObjectThemeColor = ThemeColor.Dark1;
            shape1.TextFrame.TextRange.Font.Color.Brightness = 0.25;
            shape1_p1.Runs[0].Font.Bold = true;
            shape1_p3.Runs[0].Font.Bold = true;

            //Do table filter
            var table = worksheet.Tables[0];
            table.Range.AutoFilter(1, "&gt;=102");
           //save to an excel file
   workbook.Save("BloodSugarTracker.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelTemplates.EventBudget" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file Event budget.xlsx from resource
            var fileStream = this.GetTemplateStream("Event budget.xlsx");

            workbook.Open(fileStream);

            var worksheet = workbook.ActiveSheet;

            //change range B2's font size.
            worksheet.Range["B2"].Font.Size = 22;

            //change range E4's font style to bold.
            worksheet.Range["E4"].Font.Bold = true;

            //change table style.
            worksheet.Tables["tblAdmissions"].TableStyle = workbook.TableStyles["TableStyleLight10"];
            worksheet.Tables["tblAds"].TableStyle = workbook.TableStyles["TableStyleLight10"];
            worksheet.Tables["tblVendors"].TableStyle = workbook.TableStyles["TableStyleLight10"];
            worksheet.Tables["tblItems"].TableStyle = workbook.TableStyles["TableStyleLight10"];

            //modify range F4:G5's cell style.
            worksheet.Range["F4:G5"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["F4:G5"].Interior.TintAndShade = -0.15;
            worksheet.Range["F4:G5"].Font.ThemeFont = ThemeFont.Major;
            worksheet.Range["F4:G5"].Font.Size = 12;
            worksheet.Range["F4:G5"].Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.None;
            worksheet.Range["F5:G5"].NumberFormat = "$#,##0.00";

            //modify table columns' style.
            worksheet.Range["F8:G11, F15:G18, F22:G25, F29:G33"].Interior.ThemeColor = ThemeColor.Light1;
            worksheet.Range["F8:G11, F15:G18, F22:G25, F29:G33"].Interior.TintAndShade = -0.15;
            worksheet.Range["E8:G11, E15:G18, E22:G25, E29:G33"].NumberFormat = "$#,##0.00";
           //save to an excel file
   workbook.Save("EventBudget.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelTemplates.MonthlyBusinessBudget" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file Monthly business budget.xlsx from resource
            var fileStream = this.GetTemplateStream("Monthly business budget.xlsx");

            workbook.Open(fileStream);

            var worksheet = workbook.ActiveSheet;

            // change table style to TableStyleMedium14
            var totalsTable = worksheet.Tables["TotalsTable"];
            totalsTable.TableStyle = workbook.TableStyles["TableStyleMedium14"];

            // change chart type to column stacked
            var chart = worksheet.Shapes[0].Chart;
            chart.ChartType = ChartType.ColumnStacked;
            chart.ColumnGroups[0].Overlap = 100;

            // set a bigger font size for chart title
            chart.ChartTitle.Font.Size = 24;
            chart.ChartTitle.Font.Bold = true;

            // give a one color gradient to chart area
            chart.ChartArea.Format.Fill.OneColorGradient(GradientStyle.Horizontal, 1, 0);
            chart.ChartArea.Format.Fill.GradientStops[0].Color.ObjectThemeColor = ThemeColor.Accent6;
            chart.ChartArea.Format.Fill.GradientStops[0].Color.Brightness = 0.8;

            // make fill of plot area transparant
            chart.PlotArea.Format.Fill.Transparency = 1;

            // config series1 of chart
            ISeries series1 = chart.SeriesCollection[0];
            series1.HasDataLabels = true;
            series1.Format.Fill.Color.ObjectThemeColor = ThemeColor.Accent1;

            // give some formatting for the first point of series1
            IPoint point1 = series1.Points[0];
            point1.Format.Line.Color.RGB = Color.Black;
            point1.Format.Line.Weight = 2;
            point1.Format.Line.DashStyle = LineDashStyle.Dash;

            // config series2 of chart
            ISeries series2 = chart.SeriesCollection[1];
            series2.HasDataLabels = true;
            series2.Format.Fill.Color.ObjectThemeColor = ThemeColor.Accent6;
            series2.DataLabels.Font.Color.RGB = Color.Red;

            // get the value axis
            IAxis value_axis = chart.Axes.Item(AxisType.Value, AxisGroup.Primary);

            // show the display unit as thousands for value axis
            value_axis.HasDisplayUnitLabel = true;
            value_axis.DisplayUnit = DisplayUnit.Thousands;
            
            // give a color for the major grid line of value axis
            value_axis.MajorGridlines.Format.Line.Color.ObjectThemeColor = ThemeColor.Accent6;
           //save to an excel file
   workbook.Save("MonthlyBusinessBudget.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.ExcelTemplates.SimpleInvoice" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file Simple invoice.xlsx from resource
            var fileStream = this.GetTemplateStream("Simple invoice.xlsx");

            workbook.Open(fileStream);

            var worksheet = workbook.ActiveSheet;

            // fill some new items
            worksheet.Range["E09:H09"].Value = new object[] { "DD1-001", "Item 3", 5.60, 12 };
            worksheet.Range["E10:H10"].Value = new object[] { "DD2-001", "Item 3", 8.5, 14 };
            worksheet.Range["E11:H11"].Value = new object[] { "DD3-001", "Item 3", 9.6, 16 };
           //save to an excel file
   workbook.Save("SimpleInvoice.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.ChartJustPlotVisibleCell" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Line, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            //Hidden row 3.
            worksheet.Range["3:3"].Hidden = true;

            //plot visible cells only, does not plot row 3.
            shape.Chart.PlotVisibleOnly = true;
           //save to an excel file
   workbook.Save("ChartJustPlotVisibleCell.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.ConfigChartAreaFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Column3D, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IChartArea chartarea = shape.Chart.ChartArea;

            //Format
            chartarea.Format.Fill.Color.RGB = Color.White;
            chartarea.Format.Line.Color.RGB = Color.LightGreen;
            chartarea.Format.Line.Weight = 2;

            //3d format just take effort in chart area.
            chartarea.Format.ThreeD.RotationX = 60;
            chartarea.Format.ThreeD.RotationY = 20;
            chartarea.Format.ThreeD.RotationZ = 100;
            chartarea.Format.ThreeD.Z = 20;
            chartarea.Format.ThreeD.Perspective = 20;
            chartarea.Format.ThreeD.Depth = 5;

            //Font
            chartarea.Font.Bold = true;
            chartarea.Font.Italic = true;
            chartarea.Font.Color.RGB = Color.LightGreen;
            //rounded corners.
            chartarea.RoundedCorners = true;
           //save to an excel file
   workbook.Save("ConfigChartAreaFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.ConfigChartFloorStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Column3D, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            shape.Chart.Floor.Thickness = 10;
            shape.Chart.Floor.Format.Fill.Color.RGB = Color.LightGreen;
            shape.Chart.Floor.Format.Line.Color.RGB = Color.LightBlue;
           //save to an excel file
   workbook.Save("ConfigChartFloorStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.ConfigChartTitleStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Column3D, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);


            shape.Chart.HasTitle = true;
            shape.Chart.ChartTitle.Text = "MyChart";
            shape.Chart.ChartTitle.Font.Bold = true;
            shape.Chart.ChartTitle.Format.Fill.Color.RGB = Color.LightGreen;
            shape.Chart.ChartTitle.Format.Line.Color.RGB = Color.LightBlue;
            shape.Chart.ChartTitle.Format.Line.Weight = 2;
           //save to an excel file
   workbook.Save("ConfigChartTitleStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.ConfigChartWallStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Column3D, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            //config back wall and side wall together.
            shape.Chart.Walls.Thickness = 10;
            shape.Chart.Walls.Format.Fill.Color.RGB = Color.LightPink;
            shape.Chart.Walls.Format.Line.Color.RGB = Color.LightBlue;

            //config back wall individually.
            shape.Chart.BackWall.Thickness = 10;
            shape.Chart.BackWall.Format.Fill.Color.RGB = Color.LightGreen;
            shape.Chart.BackWall.Format.Line.Color.RGB = Color.LightBlue;
           //save to an excel file
   workbook.Save("ConfigChartWallStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.ConfigLegendEntryFontStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Column3D, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            shape.Chart.HasLegend = true;
            GrapeCity.Documents.Spread.Drawing.ILegend legend = shape.Chart.Legend;
            GrapeCity.Documents.Spread.Drawing.ILegendEntry legendentry = legend.LegendEntries[0];
            legendentry.Font.Color.RGB = Color.LightBlue;
            legendentry.Font.Italic = true;
           //save to an excel file
   workbook.Save("ConfigLegendEntryFontStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.ConfigLegendPositionAndLayout" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Column3D, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            shape.Chart.HasLegend = true;
            GrapeCity.Documents.Spread.Drawing.ILegend legend = shape.Chart.Legend;
            //position.
            legend.Position = GrapeCity.Documents.Spread.Drawing.LegendPosition.Left;
            //font.
            legend.Font.Color.RGB = Color.Red;
            legend.Font.Italic = true;
            //format.
            legend.Format.Fill.Color.RGB = Color.Pink;
            legend.Format.Line.Color.RGB = Color.Green;
           //save to an excel file
   workbook.Save("ConfigLegendPositionAndLayout.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.ConfigPlotAreaFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Column3D, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IPlotArea plotarea = shape.Chart.PlotArea;
            plotarea.Format.Fill.Color.RGB = Color.Pink;
            plotarea.Format.Line.Color.RGB = Color.Green;
            plotarea.Format.Line.Weight = 2;
           //save to an excel file
   workbook.Save("ConfigPlotAreaFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.CreateChart" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };

            //create chart.
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);
           //save to an excel file
   workbook.Save("CreateChart.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.DeleteChart" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            //delete chart.
            shape.Chart.Delete();
           //save to an excel file
   workbook.Save("DeleteChart.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.ConfigAxesFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Line, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis category_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Category);
            GrapeCity.Documents.Spread.Drawing.IAxis value_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Value);

            //set category axis's format.
            category_axis.Format.Fill.Color.ObjectThemeColor = ThemeColor.Accent6;
            category_axis.Format.Fill.Color.TintAndShade = 0.8;
            category_axis.Format.Line.Color.RGB = Color.LightGreen;
            category_axis.Format.Line.Weight = 3;
            category_axis.Format.Line.Style = GrapeCity.Documents.Spread.Drawing.LineStyle.Single;

            //set value axis's format.
            value_axis.Format.Line.Color.RGB = Color.Pink;
            value_axis.Format.Line.Weight = 2;
            value_axis.Format.Line.Style = GrapeCity.Documents.Spread.Drawing.LineStyle.ThinThin;
           //save to an excel file
   workbook.Save("ConfigAxesFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.ConfigAxisTitle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis category_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Category);

            category_axis.HasTitle = true;
            category_axis.AxisTitle.Format.Fill.Color.RGB = Color.Pink;
            category_axis.AxisTitle.Text = "category axis";
            category_axis.AxisTitle.Font.Size = 10;
            category_axis.AxisTitle.Font.Color.RGB = Color.Green;
           //save to an excel file
   workbook.Save("ConfigAxisTitle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.ConfigCategoryAxisUnits" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["A2:A6"].NumberFormat = "m/d/yyyy";
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {new DateTime(2015, 10, 21), 10, 25, 25},
                {new DateTime(2016, 10, 25), -51, -36, 27},
                {new DateTime(2017, 12, 20), 52, -85, -30},
                {new DateTime(2018, 5, 5), 22, 65, 65},
                {new DateTime(2019, 10, 12), 23, 69, 69}
            };

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis category_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Category);

            category_axis.MaximumScale = new DateTime(2019, 10, 1).ToOADate();
            category_axis.MinimumScale = new DateTime(2015, 10, 1).ToOADate();
            category_axis.BaseUnit = GrapeCity.Documents.Spread.Drawing.TimeUnit.Years;
            category_axis.MajorUnitScale = GrapeCity.Documents.Spread.Drawing.TimeUnit.Months;
            category_axis.MajorUnit = 4;
            category_axis.MinorUnitScale = GrapeCity.Documents.Spread.Drawing.TimeUnit.Days;
            category_axis.MinorUnit = 60;
           //save to an excel file
   workbook.Save("ConfigCategoryAxisUnits.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.ConfigDisplayUnitLabel" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis value_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Value);
            value_axis.DisplayUnit = GrapeCity.Documents.Spread.Drawing.DisplayUnit.Custom;
            value_axis.DisplayUnitCustom = 100;
            value_axis.HasDisplayUnitLabel = true;
            value_axis.DisplayUnitLabel.Font.Color.RGB = Color.Green;
            value_axis.DisplayUnitLabel.Format.Fill.Color.RGB = Color.Pink;
            value_axis.DisplayUnitLabel.Format.Line.Color.RGB = Color.Pink;
           //save to an excel file
   workbook.Save("ConfigDisplayUnitLabel.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.ConfigGridlines" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis category_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Category);
            category_axis.HasMajorGridlines = true;
            category_axis.HasMinorGridlines = true;
            category_axis.MajorGridlines.Format.Line.Color.RGB = Color.LightGreen;
            category_axis.MajorGridlines.Format.Line.Weight = 2;
            category_axis.MinorGridlines.Format.Line.Color.RGB = Color.Pink;
            category_axis.MinorGridlines.Format.Line.Weight = 1;
            category_axis.MinorGridlines.Format.Line.Style = GrapeCity.Documents.Spread.Drawing.LineStyle.ThickThin;
           //save to an excel file
   workbook.Save("ConfigGridlines.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.ConfigTickMarkLabel" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis category_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Category);
            GrapeCity.Documents.Spread.Drawing.IAxis value_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Value);

            category_axis.TickLabelPosition = GrapeCity.Documents.Spread.Drawing.TickLabelPosition.NextToAxis;
            category_axis.TickLabelSpacing = 2;
            category_axis.TickLabels.Font.Color.RGB = Color.MediumPurple;
            category_axis.TickLabels.Font.Italic = true;
            category_axis.TickLabels.NumberFormat = "#,##0.00";
            category_axis.TickLabels.Offset = 100;

            value_axis.TickLabels.NumberFormat = "#,##0;[Red]#,##0";
           //save to an excel file
   workbook.Save("ConfigTickMarkLabel.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.ConfigValueAxisUnits" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis category_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Category);
            GrapeCity.Documents.Spread.Drawing.IAxis value_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Value);

            value_axis.MaximumScale = 100;
            value_axis.MinimumScale = -100;
            value_axis.MajorUnit = 30;
            value_axis.MinorUnit = 6;
           //save to an excel file
   workbook.Save("ConfigValueAxisUnits.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.SetAxisScaleType" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis value_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Value);
            value_axis.ScaleType = GrapeCity.Documents.Spread.Drawing.ScaleType.Logarithmic;
            value_axis.LogBase = 5;
           //save to an excel file
   workbook.Save("SetAxisScaleType.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Axes.SetAxisTickMark" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.IAxis category_axis = shape.Chart.Axes.Item(GrapeCity.Documents.Spread.Drawing.AxisType.Category);
            category_axis.Format.Line.Color.RGB = Color.Green;
            category_axis.MajorTickMark = GrapeCity.Documents.Spread.Drawing.TickMark.Inside;
            category_axis.MinorTickMark = GrapeCity.Documents.Spread.Drawing.TickMark.Cross;
            category_axis.TickMarkSpacing = 2;
           //save to an excel file
   workbook.Save("SetAxisTickMark.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.AddSeries" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };

            //Add series
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);
            
            GrapeCity.Documents.Spread.Drawing.ISeries series1 = shape.Chart.SeriesCollection[0];
            GrapeCity.Documents.Spread.Drawing.ISeries series2 = shape.Chart.SeriesCollection[1];

            //change series1's axis group, plot on secondary axis.
            series1.AxisGroup = GrapeCity.Documents.Spread.Drawing.AxisGroup.Secondary;

            //change series2's chart type.
            series2.ChartType = GrapeCity.Documents.Spread.Drawing.ChartType.LineMarkers;

            //if it is a negative point, its color is red.
            series1.InvertIfNegative = true;
            series1.InvertColor.ObjectThemeColor = ThemeColor.Accent2;

            //config series2's marker style.
            series2.MarkerStyle = GrapeCity.Documents.Spread.Drawing.MarkerStyle.Diamond;
            series2.MarkerSize = 5;
            series2.MarkerFormat.Fill.Color.RGB = Color.Orange;
            series2.MarkerFormat.Line.Style = GrapeCity.Documents.Spread.Drawing.LineStyle.ThickThin;
            series2.MarkerFormat.Line.Color.RGB = Color.LightYellow;
            series2.MarkerFormat.Line.Weight = 3;

            //change series2's line color.
            series2.Format.Line.Color.RGB = Color.LightGreen;
           //save to an excel file
   workbook.Save("AddSeries.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.ConfigBubbleChartLayout" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Bubble, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.ISeries series1 = shape.Chart.SeriesCollection[0];
            series1.HasDataLabels = true;

            shape.Chart.XYGroups[0].BubbleScale = 150;
            shape.Chart.XYGroups[0].SizeRepresents = GrapeCity.Documents.Spread.Drawing.SizeRepresents.SizeIsArea;
            shape.Chart.XYGroups[0].ShowNegativeBubbles = true;
           //save to an excel file
   workbook.Save("ConfigBubbleChartLayout.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.ConfigDataLabelTextAndFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.ISeries series1 = shape.Chart.SeriesCollection[0];
            series1.HasDataLabels = true;

            //set series1's all data label's format.
            series1.DataLabels.Format.Fill.Color.RGB = Color.Pink;
            series1.DataLabels.Format.Line.Color.RGB = Color.Green;
            series1.DataLabels.Format.Line.Weight = 1;

            //set series1's specific data label's format.
            series1.DataLabels[2].Format.Fill.Color.RGB = Color.LightGreen;
            series1.Points[2].DataLabel.Format.Line.Color.RGB = Color.Pink;
            series1.Points[2].DataLabel.Format.Line.Weight = 2;

            //customize data lables' text.
            series1.DataLabels.ShowCategoryName = true;
            series1.DataLabels.ShowSeriesName = true;
            series1.DataLabels.ShowLegendKey = true;
           //save to an excel file
   workbook.Save("ConfigDataLabelTextAndFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.ConfigDataPointFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.ISeries series1 = shape.Chart.SeriesCollection[0];
            GrapeCity.Documents.Spread.Drawing.ISeries series2 = shape.Chart.SeriesCollection[1];

            //set series format.
            series1.Format.Fill.Color.RGB = Color.LightBlue;

            //set data point format.
            series1.Points[2].Format.Fill.Color.RGB = Color.LightGreen;
           //save to an excel file
   workbook.Save("ConfigDataPointFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.CreateConnectorLine" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.PieOfPie, 300, 10, 300, 265);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            //connector line for pie of pie chart.
            shape.Chart.PieGroups[0].HasSeriesLines = true;
            shape.Chart.PieGroups[0].SeriesLines.Format.Line.Color.RGB = Color.Orange;
           //save to an excel file
   workbook.Save("CreateConnectorLine.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.CreateDropLine" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Line, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            shape.Chart.LineGroups[0].HasDropLines = true;
            shape.Chart.LineGroups[0].DropLines.Format.Line.Color.RGB = Color.LightPink;
            shape.Chart.LineGroups[0].DropLines.Format.Line.Weight = 3;
           //save to an excel file
   workbook.Save("CreateDropLine.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.CreateHiLoLine" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Line, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            shape.Chart.LineGroups[0].HasHiLoLines = true;
            shape.Chart.LineGroups[0].HiLoLines.Format.Line.Color.RGB = Color.LightPink;
            shape.Chart.LineGroups[0].HiLoLines.Format.Line.Weight = 3;
           //save to an excel file
   workbook.Save("CreateHiLoLine.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.CreateSeriesLine" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnStacked, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            shape.Chart.ColumnGroups[0].HasSeriesLines = true;
            shape.Chart.ColumnGroups[0].SeriesLines.Format.Line.Color.RGB = Color.LightPink;
            shape.Chart.ColumnGroups[0].SeriesLines.Format.Line.Weight = 3;
           //save to an excel file
   workbook.Save("CreateSeriesLine.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.CreateTrendline" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            GrapeCity.Documents.Spread.Drawing.ISeries series1 = shape.Chart.SeriesCollection[0];

            series1.Trendlines.Add();
            series1.Trendlines[0].Type = GrapeCity.Documents.Spread.Drawing.TrendlineType.Linear;
            series1.Trendlines[0].Forward = 1;
            series1.Trendlines[0].Backward = 0.5;
            series1.Trendlines[0].Intercept = 2.5;
            series1.Trendlines[0].DisplayEquation = true;
            series1.Trendlines[0].DisplayRSquared = true;
           //save to an excel file
   workbook.Save("CreateTrendline.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.CreateUpDownBars" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.Line, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            //config up down bars for line chart.
            shape.Chart.LineGroups[0].HasUpDownBars = true;
            shape.Chart.LineGroups[0].UpBars.Format.Fill.Color.RGB = Color.FromRGB(199, 235, 217);
            shape.Chart.LineGroups[0].DownBars.Format.Fill.Color.RGB = Color.LightPink;
           //save to an excel file
   workbook.Save("CreateUpDownBars.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.ExtendSeries" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            worksheet.Range["A12:D14"].Value = new object[,]
            {
                {"Item6", 50, 20, -30},
                {"Item7", 60, 50, 50},
                {"Item8", 35, 80, 60}
            };

            //add new data point to existing series.
            shape.Chart.SeriesCollection.Extend(worksheet.Range["A12:D14"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true);
           //save to an excel file
   workbook.Save("ExtendSeries.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Charts.Series.SetVaryColorForColumnChart" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Spread.Drawing.ChartType.ColumnClustered, 300, 10, 300, 300);
            worksheet.Range["A1:D6"].Value = new object[,]
            {
                {null, "S1", "S2", "S3"},
                {"Item1", 10, 25, 25},
                {"Item2", -51, -36, 27},
                {"Item3", 52, -85, -30},
                {"Item4", 22, 65, 65},
                {"Item5", 23, 69, 69}
            };
            shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Spread.Drawing.RowCol.Columns, true, true);

            //delete chart series, make series count to 1.
            shape.Chart.SeriesCollection[2].Delete();
            shape.Chart.SeriesCollection[1].Delete();
            //Chart's series count is 1.
            var count = shape.Chart.SeriesCollection.Count;

            //set vary colors for column chart which only has one series.
            shape.Chart.ColumnGroups[0].VaryByCategories = true;
           //save to an excel file
   workbook.Save("SetVaryColorForColumnChart.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Comments.AddComment" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //create comment for range C3.
            IComment comment = worksheet.Range["C3"].AddComment("Range C3's comment.");

            //change comment's text.
            comment.Text = "Range C3's new comment.";
           //save to an excel file
   workbook.Save("AddComment.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Comments.ClearComment" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["C3"].AddComment("Range C3's comment.");
            worksheet.Range["D4"].AddComment("Range D4's comment.");
            worksheet.Range["D5"].AddComment("Range D5's comment.");

            //delete a single cell comment.
            worksheet.Range["D5"].Comment.Delete();

            //clear a range of cells comment.
            worksheet.Range["C3:D4"].ClearComments();
           //save to an excel file
   workbook.Save("ClearComment.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Comments.ConfigCommentLayout" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            IComment commentC3 = worksheet.Range["C3"].AddComment("Range C3's comment.");
            commentC3.Shape.Line.Color.RGB = Color.LightGreen;
            commentC3.Shape.Line.Weight = 3;
            commentC3.Shape.Line.Style = GrapeCity.Documents.Spread.Drawing.LineStyle.ThickThin;
            commentC3.Shape.Line.DashStyle = GrapeCity.Documents.Spread.Drawing.LineDashStyle.Solid;
            commentC3.Shape.Fill.Color.RGB = Color.Pink;
            commentC3.Shape.Width = 100;
            commentC3.Shape.Height = 200;
            commentC3.Shape.TextFrame.TextRange.Font.Bold = true;
            commentC3.Visible = true;
           //save to an excel file
   workbook.Save("ConfigCommentLayout.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Comments.SetRichTextForComment" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            IComment commentC3 = worksheet.Range["C3"].AddComment("This is a rich text comment:\r\n");

            //config the paragraph's style.
            commentC3.Shape.TextFrame.TextRange.Paragraphs[0].Font.Bold = true;

            //add runs for the paragraph.
            commentC3.Shape.TextFrame.TextRange.Paragraphs[0].Runs.Add("Run1 font size is 15.", 1);
            commentC3.Shape.TextFrame.TextRange.Paragraphs[0].Runs.Add("Run2 font strikethrough.", 2);
            commentC3.Shape.TextFrame.TextRange.Paragraphs[0].Runs.Add("Run3 font italic, green color.");

            //config the first run of the paragraph's style.
            commentC3.Shape.TextFrame.TextRange.Paragraphs[0].Runs[1].Font.Size = 15;
            //config the second run of the paragraph's style. 
            commentC3.Shape.TextFrame.TextRange.Paragraphs[0].Runs[2].Font.Strikethrough = true;

            //config the third run of the paragraph's style. 
            commentC3.Shape.TextFrame.TextRange.Paragraphs[0].Runs[3].Font.Italic = true;
            commentC3.Shape.TextFrame.TextRange.Paragraphs[0].Runs[3].Font.Color.RGB = Color.Green;

            //show comment.
            commentC3.Visible = true;

            commentC3.Shape.WidthInPixel = 300;
            commentC3.Shape.HeightInPixel = 100;
           //save to an excel file
   workbook.Save("SetRichTextForComment.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateAverageRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B:C"].ColumnWidth = 17;

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //weight above 1 std dev average, set its interior color to green.
            IAboveAverage averageCondition = worksheet.Range["E2:E7"].FormatConditions.AddAboveAverage();
            averageCondition.AboveBelow = AboveBelow.BelowAverage;
            averageCondition.NumStdDev = 1;
            averageCondition.Interior.Color = Color.Pink;
           //save to an excel file
   workbook.Save("CreateAverageRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateCellValueRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B:C"].ColumnWidth = 17;

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //weight between 71 and 79, set its interior color to yellow.
            IFormatCondition condition = worksheet.Range["E2:E7"].FormatConditions.Add(FormatConditionType.CellValue, FormatConditionOperator.Between, 71, 79) as IFormatCondition;
            condition.Interior.Color = Color.LightGreen;
           //save to an excel file
   workbook.Save("CreateCellValueRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateDatabBarRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //data bar rule.
            IDataBar dataBar = worksheet.Range["E2:E7"].FormatConditions.AddDatabar();

            dataBar.MinPoint.Type = ConditionValueTypes.LowestValue;
            dataBar.MinPoint.Value = null;
            dataBar.MaxPoint.Type = ConditionValueTypes.HighestValue;
            dataBar.MaxPoint.Value = null;

            dataBar.BarFillType = DataBarFillType.Gradient;
            dataBar.BarColor.Color = Color.Green;
            dataBar.Direction = DataBarDirection.Context;
            dataBar.AxisColor.Color = Color.Red;
            dataBar.AxisPosition = DataBarAxisPosition.Automatic;
            dataBar.NegativeBarFormat.BorderColorType = DataBarNegativeColorType.Color;
            dataBar.NegativeBarFormat.BorderColor.Color = Color.Blue;
            dataBar.NegativeBarFormat.ColorType = DataBarNegativeColorType.Color;
            dataBar.NegativeBarFormat.Color.Color = Color.Pink;
            dataBar.ShowValue = false;
           //save to an excel file
   workbook.Save("CreateDatabBarRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateExpressionRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //expression rule, format weight greater than 80.
            IFormatCondition condition = worksheet.Range["E2:E7"].FormatConditions.Add(FormatConditionType.Expression, 0, "=E2&gt;72") as IFormatCondition;
            condition.Interior.Color = Color.LightPink;
           //save to an excel file
   workbook.Save("CreateExpressionRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateIconSetRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //icon set rule.
            IIconSetCondition condition = worksheet.Range["E2:E7"].FormatConditions.AddIconSetCondition();
            condition.IconSet = workbook.IconSets[IconSetType.Icon3Symbols];
            condition.IconCriteria[1].Operator = FormatConditionOperator.GreaterEqual;
            condition.IconCriteria[1].Value = 50;
            condition.IconCriteria[1].Type = ConditionValueTypes.Percent;
            condition.IconCriteria[2].Operator = FormatConditionOperator.GreaterEqual;
            condition.IconCriteria[2].Value = 70;
            condition.IconCriteria[2].Type = ConditionValueTypes.Percent;
           //save to an excel file
   workbook.Save("CreateIconSetRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateMultiRuleForRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //iconset rule
            IIconSetCondition iconset = worksheet.Range["E2:E7"].FormatConditions.AddIconSetCondition();
            iconset.IconSet = workbook.IconSets[IconSetType.Icon3TrafficLights1];

            //cell value rule added later, it has the highest priority, set StopIfTrue to true, if cell match condition, it will not apply icon set rule.
            IFormatCondition cellvalueRule = worksheet.Range["E2:E7"].FormatConditions.Add(FormatConditionType.CellValue, FormatConditionOperator.Between, "71", "79") as IFormatCondition;
            cellvalueRule.Font.ThemeColor = ThemeColor.Accent1;
            cellvalueRule.StopIfTrue = true;
           //save to an excel file
   workbook.Save("CreateMultiRuleForRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateThreeColorScaleRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //three color scale.
            IColorScale threeColorScaleRule = worksheet.Range["E2:E7"].FormatConditions.AddColorScale(ColorScaleType.ThreeColorScale);
            threeColorScaleRule.ColorScaleCriteria[0].Type = ConditionValueTypes.LowestValue;
            threeColorScaleRule.ColorScaleCriteria[0].FormatColor.Color = Color.Red;

            threeColorScaleRule.ColorScaleCriteria[1].Type = ConditionValueTypes.Percent;
            threeColorScaleRule.ColorScaleCriteria[1].Value = 50;
            threeColorScaleRule.ColorScaleCriteria[1].FormatColor.Color = Color.Yellow;

            threeColorScaleRule.ColorScaleCriteria[2].Type = ConditionValueTypes.HighestValue;
            threeColorScaleRule.ColorScaleCriteria[2].FormatColor.Color = Color.Green;
           //save to an excel file
   workbook.Save("CreateThreeColorScaleRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateTopBottomRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //top bottom rule.
            ITop10 condition = worksheet.Range["E2:E7"].FormatConditions.AddTop10();
            condition.TopBottom = TopBottom.Top;
            condition.Rank = 50;
            condition.Percent = true;
            condition.Interior.Color = Color.Red;
           //save to an excel file
   workbook.Save("CreateTopBottomRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateTwoColorScaleRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //two color scale.
            IColorScale twoColorScaleRule = worksheet.Range["E2:E7"].FormatConditions.AddColorScale(ColorScaleType.TwoColorScale);
            twoColorScaleRule.ColorScaleCriteria[0].Type = ConditionValueTypes.Number;
            twoColorScaleRule.ColorScaleCriteria[0].Value = 58;
            twoColorScaleRule.ColorScaleCriteria[0].FormatColor.Color = Color.Red;

            twoColorScaleRule.ColorScaleCriteria[1].Type = ConditionValueTypes.Number;
            twoColorScaleRule.ColorScaleCriteria[1].Value = 80;
            twoColorScaleRule.ColorScaleCriteria[1].FormatColor.Color = Color.Green;
           //save to an excel file
   workbook.Save("CreateTwoColorScaleRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.CreateUniqueRule" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //Unique rule.
            IUniqueValues condition = worksheet.Range["E2:E7"].FormatConditions.AddUniqueValues();
            condition.DupeUnique = DupeUnique.Unique;
            condition.Font.Name = "Arial";
            condition.Interior.Color = Color.Pink;
           //save to an excel file
   workbook.Save("CreateUniqueRule.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.ConditionalFormatting.DeleteConditionalFormatRules" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };
            worksheet.Range["A1:F7"].Value = data;

            //iconset rule
            IIconSetCondition iconset = worksheet.Range["E2:E7"].FormatConditions.AddIconSetCondition();
            iconset.IconSet = workbook.IconSets[IconSetType.Icon3TrafficLights1];

            //cell value rule added later, it has the highest priority, set StopIfTrue to true, if cell match condition, it will not apply icon set rule.
            IFormatCondition cellvalueRule = worksheet.Range["E2:E7"].FormatConditions.Add(FormatConditionType.CellValue, FormatConditionOperator.Between, "71", "79") as IFormatCondition;
            cellvalueRule.StopIfTrue = true;

            //delete icon set rule.
            (worksheet.Range["E2:E7"].FormatConditions[1] as IIconSetCondition).Delete();

            //delete all the rules
            worksheet.Range["E2:E7"].FormatConditions.Delete();
           //save to an excel file
   workbook.Save("DeleteConditionalFormatRules.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.CreateCustomValidation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["A2"].Value = 1;
            worksheet.Range["A3"].Value = 2;

            worksheet.Range["C2"].Value = 0;

            //create custom validation, if the expression "=$C$2" result is true, the cell's validation will be true, otherwise, it is false.
            //when use custom validation, validationOperator and formula2 parameters will be ignored even if you have given.
            worksheet.Range["A2:A3"].Validation.Add(ValidationType.Custom, ValidationAlertStyle.Information, formula1:"=$C$2");

            //judge if Range["A2:A3"] has validation.
            for (int i = 1; i &lt;= 2; i++)
            {
                if (worksheet.Range[i, 0].HasValidation)
                {
                    //set the range[i, 0]'s interior color.
                    worksheet.Range[i, 0].Interior.Color = Color.LightBlue;
                }
            }
           //save to an excel file
   workbook.Save("CreateCustomValidation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.CreateDateValidation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["C2:E4"].Value = new object[,]
            {
                {new DateTime(2015, 12, 1), new DateTime(2015, 12, 14), new DateTime(2015, 12, 15) },
                {new DateTime(2015, 12, 18), new DateTime(2015, 12, 19), new DateTime(2015, 12, 30) },
                {new DateTime(2015, 12, 31), new DateTime(2014, 12, 13), new DateTime(2017, 12, 15) }
            };

            //create date validation.
            worksheet.Range["C2:E4"].Validation.Add(ValidationType.Date, ValidationAlertStyle.Stop, ValidationOperator.Between, new DateTime(2015, 12, 13), new DateTime(2015, 12, 18));

            //set column width just for export shown.
            worksheet.Range["C:E"].EntireColumn.ColumnWidthInPixel = 120;

            //judge if Range["C2:E4"] has validation.
            for (int i = 1; i &lt;= 3; i++)
            {
                for (int j = 2; j &lt;= 4; j++)
                {
                    if (worksheet.Range[i, j].HasValidation)
                    {
                        //set the range[i, j]'s interior color.
                        worksheet.Range[i, j].Interior.Color = Color.LightBlue;
                    }
                }
            }
           //save to an excel file
   workbook.Save("CreateDateValidation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.CreateDecimalValidation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["C2:E4"].Value = new object[,]
            {
                {1, 3.0, 3.4},
                {7, 9, 102.7},
                {102.8, 110, 120}
            };

            //add decimal validation.
            worksheet.Range["C2:E4"].Validation.Add(ValidationType.Decimal, ValidationAlertStyle.Stop, ValidationOperator.Between, 3.4, 102.8);
            IValidation validation = worksheet.Range["C2:E4"].Validation;
            validation.IgnoreBlank = true;
            validation.InputTitle = "Tips";
            validation.InputMessage = "Input a decimal value between 3.4 and 102.8, please.";
            validation.ErrorTitle = "Error";
            validation.ErrorMessage = "input value does not between 3.4 and 102.8.";
            validation.ShowInputMessage = true;
            validation.ShowError = true;

            //judge if Range["C2:E4"] has validation.
            for (int i = 1; i &lt;= 3; i++)
            {
                for (int j = 2; j &lt;= 4; j++)
                {
                    if (worksheet.Range[i, j].HasValidation)
                    {
                        //set the range[i, j]'s interior color.
                        worksheet.Range[i, j].Interior.Color = Color.LightBlue;
                    }
                }
            }
           //save to an excel file
   workbook.Save("CreateDecimalValidation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.CreateListValidation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["A1"].Value = "aaa";
            worksheet.Range["A2"].Value = "bbb";
            worksheet.Range["A3"].Value = "ccc";

            worksheet.Range["C2:E4"].Value = new object[,]
            {
                {"aaa", "bbb", "ccc"},
                {"aaa1", "bbb1", "ccc1"},
                {"aaa2", "bbb2", "ccc2"}
            };

            //create list validation.
            worksheet.Range["C2:E4"].Validation.Add(ValidationType.List, ValidationAlertStyle.Stop, ValidationOperator.Between, "=$a$1:$a$3");
            IValidation validation = worksheet.Range["C2:E4"].Validation;
            validation.InCellDropdown = true;

            //judge if Range["C2:E4"] has validation.
            for (int i = 1; i &lt;= 3; i++)
            {
                for (int j = 2; j &lt;= 4; j++)
                {
                    if (worksheet.Range[i, j].HasValidation)
                    {
                        //set the range[i, j]'s interior color.
                        worksheet.Range[i, j].Interior.Color = Color.LightBlue;
                    }
                }
            }
           //save to an excel file
   workbook.Save("CreateListValidation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.CreateTextLength" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["C2:E4"].Value = new object[,]
            {
                {"aa", "bb", "aa1"},
                {"ccc", "dddd", "dddd1"},
                {"ff", "ffff", "ffff1"}
            };

            //create text length validation, text length between 2 and 3.
            worksheet.Range["C2:E4"].Validation.Add(ValidationType.TextLength, ValidationAlertStyle.Stop, ValidationOperator.Between, 2, 3);

            //judge if Range["C2:E4"] has validation.
            for (int i = 1; i &lt;= 3; i++)
            {
                for (int j = 2; j &lt;= 4; j++)
                {
                    if (worksheet.Range[i, j].HasValidation)
                    {
                        //set the range[i, j]'s interior color.
                        worksheet.Range[i, j].Interior.Color = Color.LightBlue;
                    }
                }
            }
           //save to an excel file
   workbook.Save("CreateTextLength.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.CreateTimeValidation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["C2:E4"].Value = new object[,]
            {
                {new TimeSpan(13, 0, 0), new TimeSpan(13, 29, 59), new TimeSpan(13, 30, 0)},
                {new TimeSpan(14, 0, 0), new TimeSpan(15, 0, 0), new TimeSpan(16, 30, 0)},
                {new TimeSpan(19, 0, 0), new TimeSpan(18, 29, 59), new TimeSpan(18, 30, 0)}
            };

            //create time validation.
            worksheet.Range["C2:E4"].Validation.Add(ValidationType.Time, ValidationAlertStyle.Stop, ValidationOperator.Between, new TimeSpan(13, 30, 0), new TimeSpan(18, 30, 0));

            //judge if Range["C2:E4"] has validation.
            for (int i = 1; i &lt;= 3; i++)
            {
                for (int j = 2; j &lt;= 4; j++)
                {
                    if (worksheet.Range[i, j].HasValidation)
                    {
                        //set the range[i, j]'s interior color.
                        worksheet.Range[i, j].Interior.Color = Color.LightBlue;
                    }
                }
            }
           //save to an excel file
   workbook.Save("CreateTimeValidation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.CreateWholeNumberValidation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["C2:E4"].Value = new object[,]
            {
                {1, 3, 5},
                {7, 9, 11},
                {13, 15, 17}
            };

            //add whole number validation.
            worksheet.Range["C2:E4"].Validation.Add(ValidationType.Whole, ValidationAlertStyle.Stop, ValidationOperator.Between, 1, 8);
            IValidation validation = worksheet.Range["C2:E4"].Validation;
            validation.IgnoreBlank = true;
            validation.InputTitle = "Tips";
            validation.InputMessage = "Input a value between 1 and 8, please";
            validation.ErrorTitle = "Error";
            validation.ErrorMessage = "input value does not between 1 and 8";
            validation.ShowInputMessage = true;
            validation.ShowError = true;

            //judge if Range["C2:E4"] has validation.
            for (int i = 1; i &lt;= 3; i++)
            {
                for (int j = 2; j &lt;= 4; j++)
                {
                    if (worksheet.Range[i, j].HasValidation)
                    {
                        //set the range[i, j]'s interior color.
                        worksheet.Range[i, j].Interior.Color = Color.LightBlue;
                    }
                }
            }
           //save to an excel file
   workbook.Save("CreateWholeNumberValidation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.DeleteValidation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["C2:E4"].Value = new object[,]
            {
                {new TimeSpan(13, 0, 0), new TimeSpan(13, 29, 59), new TimeSpan(13, 30, 0)},
                {new TimeSpan(14, 0, 0), new TimeSpan(15, 0, 0), new TimeSpan(16, 30, 0)},
                {new TimeSpan(19, 0, 0), new TimeSpan(18, 29, 59), new TimeSpan(18, 30, 0)}
            };

            //create time validation.
            worksheet.Range["C2:E4"].Validation.Add(ValidationType.Time, ValidationAlertStyle.Stop, ValidationOperator.Between, new TimeSpan(13, 30, 0), new TimeSpan(18, 30, 0));

            //delete validation.
            worksheet.Range["C2:E4"].Validation.Delete();

            //judge if Range["C2:E4"] has validation.
            for (int i = 1; i &lt;= 3; i++)
            {
                for (int j = 2; j &lt;= 4; j++)
                {
                    if (worksheet.Range[i, j].HasValidation)
                    {
                        //set the range[i, j]'s interior color.
                        worksheet.Range[i, j].Interior.Color = Color.LightBlue;
                    }
                }
            }
           //save to an excel file
   workbook.Save("DeleteValidation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.DataValidation.ModifyValidation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["C2:E4"].Value = new object[,]
            {
                {new TimeSpan(13, 0, 0), new TimeSpan(13, 29, 59), new TimeSpan(13, 30, 0)},
                {new TimeSpan(14, 0, 0), new TimeSpan(15, 0, 0), new TimeSpan(16, 30, 0)},
                {new TimeSpan(19, 0, 0), new TimeSpan(18, 29, 59), new TimeSpan(18, 30, 0)}
            };

            //create time validation.
            worksheet.Range["C2:E4"].Validation.Add(ValidationType.Time, ValidationAlertStyle.Stop, ValidationOperator.Between, new TimeSpan(13, 30, 0), new TimeSpan(18, 30, 0));

            //Modify validation.
            worksheet.Range["C2:E4"].Validation.Formula1 = new TimeSpan(14, 30, 0);
            worksheet.Range["C2:E4"].Validation.Formula2 = new TimeSpan(19, 0, 0);

            //judge if Range["C2:E4"] has validation.
            for (int i = 1; i &lt;= 3; i++)
            {
                for (int j = 2; j &lt;= 4; j++)
                {
                    if (worksheet.Range[i, j].HasValidation)
                    {
                        //set the range[i, j]'s interior color.
                        worksheet.Range[i, j].Interior.Color = Color.LightBlue;
                    }
                }
            }
           //save to an excel file
   workbook.Save("ModifyValidation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.ChangeWorksheetFilterRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["D3"].Value = "Numbers";
            worksheet.Range["D4"].Value = 1;
            worksheet.Range["D5"].Value = 2;
            worksheet.Range["D6"].Value = 3;

            //first time invoke. worksheet's filter range will be D3:D6.
            worksheet.Range["D3:D6"].AutoFilter(0, "&lt;&gt;2");

            //set AutoFilterMode to false. must set this property before, otherwise, subsequent code can not take effort.
            worksheet.AutoFilterMode = false;

            worksheet.Range["A5"].Value = "Numbers";
            worksheet.Range["A6"].Value = 1;
            worksheet.Range["A7"].Value = 2;
            worksheet.Range["A8"].Value = 3;

            //second time invoke. worksheet's filter range will change to A5:A8.
            worksheet.Range["A5:A8"].AutoFilter(0, "&lt;&gt;2");
           //save to an excel file
   workbook.Save("ChangeWorksheetFilterRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.ClearFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;
            worksheet.Range["A1:F7"].AutoFilter(4, "&lt;80");
            worksheet.Range["A1:F7"].AutoFilter(0, "*e*");
            worksheet.Range["A1:F7"].AutoFilter(1, "=Washington");

            //clear second column filter only.
            worksheet.Range["A1:F7"].AutoFilter(1);

            //clear all filters
            worksheet.AutoFilter.ShowAllData();

            //another way to clear all filters, same as AutoFilter.ShowAllData()
            worksheet.ShowAllData();
           //save to an excel file
   workbook.Save("ClearFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.MultiSelectFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;
            worksheet.Range["E2:E7"].NumberFormat = "0.00";
            //multi select, selcet the weight equals to 80.00 and 58.00.
            worksheet.Range["A1:F7"].AutoFilter(4, new object[] { "80.00", "58.00" }, AutoFilterOperator.Values);
           //save to an excel file
   workbook.Save("MultiSelectFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.ReApplyFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;
            //Weight less than 80.
            worksheet.Range["A1:F7"].AutoFilter(4, "&lt;80");
            
            //change filter range data.
            worksheet.Range["E2"].Value = 79;
            //re-apply filter condition, row 2 will be shown. 
            worksheet.AutoFilter.ApplyFilter();
           //save to an excel file
   workbook.Save("ReApplyFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.DateFiltering.DateDynamicFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //filter all dates in February.
            worksheet.Range["A1:F7"].AutoFilter(2, DynamicFilterType.M2, AutoFilterOperator.Dynamic);
           //save to an excel file
   workbook.Save("DateDynamicFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.DateFiltering.DateFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            var criteria1 = new DateTime(1972, 7, 3).ToString();
            var criteria2 = new DateTime(1993, 2, 15).ToString();
            //filter date between 1972.7.3 and 1993.2.15
            worksheet.Range["A1:F7"].AutoFilter(2, "&gt;=" + criteria1, AutoFilterOperator.And, "&lt;=" + criteria2);
           //save to an excel file
   workbook.Save("DateFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.FilteringByColor.FilterByAutomaticFontColor" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;
            worksheet.Range["E2"].Font.Color = Color.Green;
            worksheet.Range["E5"].Font.Color = Color.Green;
            worksheet.Range["E6"].Font.Color = Color.Red;

            //filter in the rows which font color is automatic color.
            worksheet.Range["A1:F7"].AutoFilter(4, null, AutoFilterOperator.AutomaticFontColor);
           //save to an excel file
   workbook.Save("FilterByAutomaticFontColor.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.FilteringByColor.FilterByCellColor" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;
            worksheet.Range["E2"].Interior.Color = Color.Green;
            worksheet.Range["E5"].Interior.Color = Color.Green;
            worksheet.Range["E6"].Interior.Color = Color.Red;

            //filter in the rows which cell color is green.
            worksheet.Range["A1:F7"].AutoFilter(4, worksheet.Range["E2"].Interior.Color, AutoFilterOperator.CellColor);
           //save to an excel file
   workbook.Save("FilterByCellColor.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.FilteringByColor.FilterByFontColor" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;
            worksheet.Range["E2"].Font.Color = Color.Green;
            worksheet.Range["E5"].Font.Color = Color.Green;
            worksheet.Range["E6"].Font.Color = Color.Red;

            //filter in the rows which font color is green.
            worksheet.Range["A1:F7"].AutoFilter(4, worksheet.Range["E2"].Font.Color, AutoFilterOperator.FontColor);
           //save to an excel file
   workbook.Save("FilterByFontColor.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.FilteringByColor.FilterByNoFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;
            worksheet.Range["E2"].Interior.Color = Color.Green;
            worksheet.Range["E5"].Interior.Color = Color.Green;
            worksheet.Range["E6"].Interior.Color = Color.Red;

            //filter in the rows which cell color is no fill.
            worksheet.Range["A1:F7"].AutoFilter(4, null, AutoFilterOperator.NoFill);
           //save to an excel file
   workbook.Save("FilterByNoFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.FilteringByIcon.FilterByIcon" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            IIconSetCondition iconset = worksheet.Range["E2:E7"].FormatConditions.AddIconSetCondition();
            iconset.IconSet = workbook.IconSets[IconSetType.Icon3TrafficLights1];

            //filter in the rows which icon is green light.
            worksheet.Range["A1:F7"].AutoFilter(4, workbook.IconSets[IconSetType.Icon3TrafficLights1][2], AutoFilterOperator.Icon);
           //save to an excel file
   workbook.Save("FilterByIcon.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.FilteringByIcon.FilterByNoIcon" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            IIconSetCondition iconset = worksheet.Range["E2:E7"].FormatConditions.AddIconSetCondition();
            iconset.IconSet = workbook.IconSets[IconSetType.Icon3TrafficLights1];

            IFormatCondition condition = worksheet.Range["E2:E7"].FormatConditions.Add(FormatConditionType.CellValue, FormatConditionOperator.Between, "71", "79") as IFormatCondition;
            condition.StopIfTrue = true;

            //filter in the rows which has no icon.
            worksheet.Range["A1:F7"].AutoFilter(4, null, AutoFilterOperator.NoIcon);
           //save to an excel file
   workbook.Save("FilterByNoIcon.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.NumberFiltering.NumberFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //Weight less than 80.
            worksheet.Range["A1:F7"].AutoFilter(4, "&lt;80");
           //save to an excel file
   workbook.Save("NumberFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Filtering.TextFiltering.TextFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //Name contains "e".
            worksheet.Range["A1:F7"].AutoFilter(0, "*e*");
           //save to an excel file
   workbook.Save("TextFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.ApplyStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //Change to build in name style.
            worksheet.Range["A1"].Value = "Bad";
            worksheet.Range["A1"].Style = workbook.Styles["Bad"];


            //Change to custom name style.
            //Add custom name style.
            IStyle style = workbook.Styles.Add("testStyle");

            //Config custom name style settings begin.
            //Border
            style.Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.Thin;
            style.Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Thick;
            style.Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.Double;
            style.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Double;
            style.Borders.Color = Color.FromRGB(0, 255, 0);

            //Font
            style.Font.ThemeColor = ThemeColor.Accent1;
            style.Font.TintAndShade = 0.8;
            style.Font.Italic = true;
            style.Font.Bold = true;
            style.Font.Name = "LiSu";
            style.Font.Size = 28;
            style.Font.Strikethrough = true;
            style.Font.Subscript = true;
            style.Font.Superscript = false;
            style.Font.Underline = UnderlineType.Double;

            //Protection
            style.FormulaHidden = true;
            style.Locked = false;

            //Number
            style.NumberFormat = "#,##0_);[Red](#,##0)";

            //Alignment
            style.HorizontalAlignment = HorizontalAlignment.Right;
            style.VerticalAlignment = VerticalAlignment.Bottom;
            style.WrapText = true;
            style.IndentLevel = 5;
            style.Orientation = 45;

            //Fill
            style.Interior.ColorIndex = 5;
            style.Interior.Pattern = GrapeCity.Documents.Spread.Pattern.Down;
            style.Interior.PatternColor = Color.FromRGB(0, 0, 255);


            style.IncludeAlignment = false;
            style.IncludeBorder = true;
            style.IncludeFont = false;
            style.IncludeNumber = true;
            style.IncludePatterns = false;
            style.IncludeProtection = true;
            //Config custom name style settings end.

            //Set range's style to custom name style.
            worksheet.Range["A2"].Value = "My test style";
            worksheet.Range["A2"].Style = worksheet.Workbook.Styles["testStyle"];

           //save to an excel file
   workbook.Save("ApplyStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.CreateCustomStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            //Add custom name style.
            IStyle style = workbook.Styles.Add("testStyle");

            //Config custom name style settings begin.
            //Border
            style.Borders[BordersIndex.EdgeLeft].LineStyle = BorderLineStyle.Thin;
            style.Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Thick;
            style.Borders[BordersIndex.EdgeRight].LineStyle = BorderLineStyle.Double;
            style.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Double;
            style.Borders.Color = Color.FromRGB(0, 255, 0);

            //Font
            style.Font.ThemeColor = ThemeColor.Accent1;
            style.Font.TintAndShade = 0.8;
            style.Font.Italic = true;
            style.Font.Bold = true;
            style.Font.Name = "LiSu";
            style.Font.Size = 28;
            style.Font.Strikethrough = true;
            style.Font.Subscript = true;
            style.Font.Superscript = false;
            style.Font.Underline = UnderlineType.Double;

            //Protection
            style.FormulaHidden = true;
            style.Locked = false;

            //Number
            style.NumberFormat = "#,##0_);[Red](#,##0)";

            //Alignment
            style.HorizontalAlignment = HorizontalAlignment.Right;
            style.VerticalAlignment = VerticalAlignment.Bottom;
            style.WrapText = true;
            style.IndentLevel = 5;
            style.Orientation = 45;

            //Fill
            style.Interior.ColorIndex = 5;
            style.Interior.Pattern = GrapeCity.Documents.Spread.Pattern.Down;
            style.Interior.PatternColor = Color.FromRGB(0, 0, 255);


            style.IncludeAlignment = false;
            style.IncludeBorder = true;
            style.IncludeFont = false;
            style.IncludeNumber = true;
            style.IncludePatterns = false;
            style.IncludeProtection = true;
            //Config custom name style settings end.

            //Set range's style to custom name style.
            worksheet.Range["A1"].Value = "My test style";
            worksheet.Range["A1"].Style = worksheet.Workbook.Styles["testStyle"];
           //save to an excel file
   workbook.Save("CreateCustomStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.GetDisplayFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //Range A1's displaying color is table style
            worksheet.Tables.Add(worksheet.Range["A1:E5"], true);
            var color_A1 = worksheet.Range["A1"].DisplayFormat.Interior.Color;

            //Range A1's displaying color will be cell style, yellow.
            worksheet.Range["A1"].Interior.Color = Color.Yellow;
            var color_A1_1 = worksheet.Range["A1"].DisplayFormat.Interior.Color;

            //Range A1's displaying color will be conditional format style, green.
            IFormatCondition condition = worksheet.Range["A1"].FormatConditions.Add(FormatConditionType.NoBlanksCondition) as IFormatCondition;
            condition.Interior.Color = Color.Green;
            var color_A1_2 = worksheet.Range["A1"].DisplayFormat.Interior.Color;
           //save to an excel file
   workbook.Save("GetDisplayFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Alignment.HAlignVAlign" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Columns[0].ColumnWidth = 17;

            IRange rangeA1 = worksheet.Range["A1"];
            rangeA1.Value = "Right and top";
            rangeA1.HorizontalAlignment = HorizontalAlignment.Right;
            rangeA1.VerticalAlignment = VerticalAlignment.Top;

            IRange rangeA2 = worksheet.Range["A2"];
            rangeA2.Value = "Center";
            rangeA2.HorizontalAlignment = HorizontalAlignment.Center;
            rangeA2.VerticalAlignment = VerticalAlignment.Center;

            IRange rangeA3 = worksheet.Range["A3"];
            rangeA3.Value = "Left and bottom, indent";
            rangeA3.IndentLevel = 1;
           //save to an excel file
   workbook.Save("HAlignVAlign.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Alignment.RotateCellContents" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            IRange rangeB2 = worksheet.Range["B2"];
            rangeB2.Value = "Rotated Cell Contents";
            rangeB2.HorizontalAlignment = HorizontalAlignment.Center;
            rangeB2.VerticalAlignment = VerticalAlignment.Center;
            //Rotate cell contents.
            rangeB2.Orientation = 15;
           //save to an excel file
   workbook.Save("RotateCellContents.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Alignment.ShrinkToFit" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            IRange rangeB1 = worksheet.Range["B1"];
            rangeB1.Value = "The ShrinkToFit property is applied";
            rangeB1.ShrinkToFit = true;
           //save to an excel file
   workbook.Save("ShrinkToFit.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Alignment.TextOrientation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            IRange rangeC1 = worksheet.Range["C1"];
            rangeC1.Value = "The ReadingOrder property is applied to set text direction.";
            rangeC1.ReadingOrder = ReadingOrder.RightToLeft;
           //save to an excel file
   workbook.Save("TextOrientation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Alignment.WrapText" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            IRange rangeB3 = worksheet.Range["B3"];
            rangeB3.Value = "The WrapText property is applied to wrap the text within a cell";
            rangeB3.WrapText = true;

            worksheet.Rows[2].RowHeight = 150;
           //save to an excel file
   workbook.Save("WrapText.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Borders.AddBordersToCell" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            IRange rangeB2 = worksheet.Range["B2"];

            //set left, top, right, bottom borders together.
            rangeB2.Borders.LineStyle = BorderLineStyle.DashDot;
            rangeB2.Borders.Color = Color.Green;

            //set top border individually.
            rangeB2.Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Medium;
            rangeB2.Borders[BordersIndex.EdgeTop].Color = Color.Red;

            //set diagonal down border individually.
            rangeB2.Borders[BordersIndex.DiagonalDown].LineStyle = BorderLineStyle.Hair;
            rangeB2.Borders[BordersIndex.DiagonalDown].Color = Color.Blue;

            //set diagonal up border individually.
            rangeB2.Borders[BordersIndex.DiagonalUp].LineStyle = BorderLineStyle.Dotted;
            rangeB2.Borders[BordersIndex.DiagonalUp].Color = Color.Blue;
           //save to an excel file
   workbook.Save("AddBordersToCell.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Borders.AddingBordersToRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            IRange rangeB2_E6 = worksheet.Range["B2:E6"];

            //set left, top, right, bottom borders together.
            rangeB2_E6.Borders.LineStyle = BorderLineStyle.DashDot;
            rangeB2_E6.Borders.Color = Color.Green;

            //set inside horizontal border.
            rangeB2_E6.Borders[BordersIndex.InsideHorizontal].LineStyle = BorderLineStyle.Dashed;
            rangeB2_E6.Borders[BordersIndex.InsideHorizontal].Color = Color.Tomato;

            //set inside vertical border.
            rangeB2_E6.Borders[BordersIndex.InsideVertical].LineStyle = BorderLineStyle.Double;
            rangeB2_E6.Borders[BordersIndex.InsideVertical].Color = Color.Blue;

            //set top border individually.
            rangeB2_E6.Borders[BordersIndex.EdgeTop].LineStyle = BorderLineStyle.Medium;
            rangeB2_E6.Borders[BordersIndex.EdgeTop].Color = Color.Red;
           //save to an excel file
   workbook.Save("AddingBordersToRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fill.LinearGradientFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1"].Interior.Pattern = GrapeCity.Documents.Spread.Pattern.LinearGradient;
            (worksheet.Range["A1"].Interior.Gradient as ILinearGradient).ColorStops[0].Color = Color.Red;
            (worksheet.Range["A1"].Interior.Gradient as ILinearGradient).ColorStops[1].Color = Color.Yellow;

            (worksheet.Range["A1"].Interior.Gradient as ILinearGradient).Degree = 90;
           //save to an excel file
   workbook.Save("LinearGradientFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fill.PatternFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1"].Interior.Pattern = GrapeCity.Documents.Spread.Pattern.LightDown;
            worksheet.Range["A1"].Interior.Color = Color.Pink;
            worksheet.Range["A1"].Interior.PatternColorIndex = 5;
           //save to an excel file
   workbook.Save("PatternFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fill.RectangularGradientFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1"].Interior.Pattern = GrapeCity.Documents.Spread.Pattern.RectangularGradient;
            (worksheet.Range["A1"].Interior.Gradient as IRectangularGradient).ColorStops[0].Color = Color.Red;
            (worksheet.Range["A1"].Interior.Gradient as IRectangularGradient).ColorStops[1].Color = Color.Green;

            (worksheet.Range["A1"].Interior.Gradient as IRectangularGradient).Bottom = 0.2;
            (worksheet.Range["A1"].Interior.Gradient as IRectangularGradient).Right = 0.3;
            (worksheet.Range["A1"].Interior.Gradient as IRectangularGradient).Top = 0.4;
            (worksheet.Range["A1"].Interior.Gradient as IRectangularGradient).Left = 0.5;
           //save to an excel file
   workbook.Save("RectangularGradientFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fill.SolidFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A2"].Interior.Color = Color.Green;
           //save to an excel file
   workbook.Save("SolidFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fonts.FontColor" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1"].Value = "font";
            worksheet.Range["A1"].Font.Color = Color.Green;
           //save to an excel file
   workbook.Save("FontColor.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fonts.FontEffect" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["A1"].Value = "Strikethrough";
            worksheet.Range["A1"].Font.Strikethrough = true;

            worksheet.Range["A2"].Value = "Superscript";
            worksheet.Range["A2"].Font.Superscript = true;

            worksheet.Range["A3"].Value = "Subscript";
            worksheet.Range["A3"].Font.Subscript = true;
           //save to an excel file
   workbook.Save("FontEffect.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fonts.FontName" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //use Name property to set font name.
            worksheet.Range["A1"].Value = "Calibri";
            worksheet.Range["A1"].Font.Name = "Calibri";

            //use ThemeFont property to set font name.
            worksheet.Range["A2"].Value = "Major theme font";
            worksheet.Range["A2"].Font.ThemeFont = ThemeFont.Major;
           //save to an excel file
   workbook.Save("FontName.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fonts.FontSize" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["A1"].Value = "Font size is 15";
            worksheet.Range["A1"].Font.Size = 15;
           //save to an excel file
   workbook.Save("FontSize.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fonts.FontStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["A1"].Value = "Bold";
            worksheet.Range["A1"].Font.Bold = true;

            worksheet.Range["A2"].Value = "Italic";
            worksheet.Range["A2"].Font.Italic = true;

            worksheet.Range["A3"].Value = "Bold Italic";
            worksheet.Range["A3"].Font.Bold = true;
            worksheet.Range["A3"].Font.Italic = true;
           //save to an excel file
   workbook.Save("FontStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Fonts.FontUnderline" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["A1"].Value = "Single Underline";
            worksheet.Range["A1"].Font.Underline = UnderlineType.Single;
           //save to an excel file
   workbook.Save("FontUnderline.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.NumberFormat.CustomNumberFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            //Set range values.
            worksheet.Range["A2:B2"].Value = -15.50;
            worksheet.Range["A3:B3"].Value = 555;
            worksheet.Range["A4:B4"].Value = 0;
            worksheet.Range["A5:B5"].Value = "Name";

            //Apply custom number format.
            worksheet.Range["B2:B5"].NumberFormat = "[Green]#.00;[Red]#.00;[Blue]0.00;[Cyan]\"product: \"@";
           //save to an excel file
   workbook.Save("CustomNumberFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.NumberFormat.DateAndTimeFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 17;
            worksheet.Range["A1:F1"].Formula = "= Now()";

            //Apply different date formats.
            worksheet.Range["A1"].NumberFormat = "m/d/yy";
            worksheet.Range["B1"].NumberFormat = "d-mmm-yy";
            worksheet.Range["C1"].NumberFormat = "dddd";

            //Apply different time formats.
            worksheet.Range["D1"].NumberFormat = "m/d/yy h:mm";
            worksheet.Range["E1"].NumberFormat = "h:mm AM/PM";
            worksheet.Range["F1"].NumberFormat = "h:mm:ss";
           //save to an excel file
   workbook.Save("DateAndTimeFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.NumberFormat.NumberFormats" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:H"].ColumnWidth = 17;

            // Display 111 as 111.
            worksheet.Range["A1"].Value = 111;
            worksheet.Range["A1"].NumberFormat = "#####";

            // Display 222 as 00222.
            worksheet.Range["B1"].Value = 222;
            worksheet.Range["B1"].NumberFormat = "00000";

            // Display 12345678 as 12,345,678.
            worksheet.Range["C1"].Value = 12345678;
            worksheet.Range["C1"].NumberFormat = "#,#";

            // Display .126 as 0.13.
            worksheet.Range["D1"].Value = .126;
            worksheet.Range["D1"].NumberFormat = "0.##";

            // Display 74.4 as 74.400.
            worksheet.Range["E1"].Value = 74.4;
            worksheet.Range["E1"].NumberFormat = "##.000";

            // Display 1.6 as 160.0%.
            worksheet.Range["F1"].Value = 1.6;
            worksheet.Range["F1"].NumberFormat = "0.0%";

            // Display 4321 as $4,321.00.
            worksheet.Range["G1"].Value = 4321;
            worksheet.Range["G1"].NumberFormat = "$#,##0.00";

            // Display 8.75 as 8 3/4.
            worksheet.Range["H1"].Value = 8.75;
            worksheet.Range["H1"].NumberFormat = "# ?/?";
           //save to an excel file
   workbook.Save("NumberFormats.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Protection.SetRangeFormulaHidden" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B1"].Formula = "=A1";

            //config range B1's FormulaHidden property.
            worksheet.Range["B1"].FormulaHidden = true;
            //protect worksheet, range B1's formula will not show in exported xlsx file.
            worksheet.Protection = true;
           //save to an excel file
   workbook.Save("SetRangeFormulaHidden.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formatting.Protection.SetRangeLocked" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //config range B1's Locked property.
            worksheet.Range["B1"].Locked = false;
            //protect worksheet, range B1 can be modified in exported xlsx file.
            worksheet.Protection = true;
           //save to an excel file
   workbook.Save("SetRangeLocked.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formulas.AddCustomName" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet1 = workbook.Worksheets[0];
            IWorksheet worksheet2 = workbook.Worksheets.Add();

            worksheet1.Range["C8"].NumberFormat = "0.0000";

            worksheet1.Names.Add("test1", "=Sheet1!$A$1");
            worksheet1.Names.Add("test2", "=Sheet1!test1*2");
            workbook.Names.Add("test3", "=Sheet1!$A$1");

            worksheet1.Range["A1"].Value = 1;

            //C6's value is 1.
            worksheet1.Range["C6"].Formula = "=test1";
            //C7's value is 3.
            worksheet1.Range["C7"].Formula = "=test1 + test2";
            //C8's value is 6.283185307
            worksheet1.Range["C8"].Formula = "=test2*PI()";

            //judge if Range C6:C8 have formula.
            for (int i = 5; i &lt;= 7; i++)
            {
                if (worksheet1.Range[i, 2].HasFormula)
                {
                    worksheet1.Range[i, 2].Interior.Color = Color.LightBlue;
                }
            }

            //worksheet1 range A2's value is 1.
            worksheet2.Range["A2"].Formula = "=test3";
            //judge if Range A2 has formula.
            if (worksheet2.Range["A2"].HasFormula)
            {
                worksheet2.Range["A2"].Interior.Color = Color.LightBlue;
            }

            //set r1c1 formula.
            worksheet2.Range["A3"].FormulaR1C1 = "=R[-1]C";
           //save to an excel file
   workbook.Save("AddCustomName.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formulas.ConfigWorkbookReferenceStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //set workbook's reference style to R1C1. exported xlsx file will be R1C1 style.
            workbook.ReferenceStyle = ReferenceStyle.R1C1;
           //save to an excel file
   workbook.Save("ConfigWorkbookReferenceStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formulas.DirtyAndCalculation" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1"].Value = 1;
            worksheet.Range["A2"].Formula = "=A1";
            worksheet.Range["A3"].Formula = "=SUM(A1, A2)";

            //when get value, calc engine will first calculate and cache the result, then returns the cached result.
            var value_A2 = worksheet.Range["A2"].Value;
            var value_A3 = worksheet.Range["A3"].Value;

            //disable calc engine.
            workbook.EnableCalculation = false;

            //Dirty() method will clear the cached value of the workbook.
            workbook.Dirty();
            //Calculate() will not work, because of workbook.EnablCalculation is false.
            workbook.Calculate();
            //it returns 0 because of no cache value exist.
            var value_A2_1 = worksheet.Range["A2"].Value;
            var value_A3_1 = worksheet.Range["A3"].Value;

            worksheet.Range["A1"].Value = 2;
            //enable calc engine.
            workbook.EnableCalculation = true;
            //Dirty() method will clear the cached value of Range A2:A3.
            worksheet.Range["A2:A3"].Dirty();
            //Calculate() method will calculate and cache the result, it will return the cache value directly when get value later.
            worksheet.Range["A2:A3"].Calculate();

            //it returns cache value directly, does not calculate again.
            var value_A2_2 = worksheet.Range["A2"].Value;
            var value_A3_2 = worksheet.Range["A3"].Value;

           //save to an excel file
   workbook.Save("DirtyAndCalculation.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formulas.UseArrayFormula" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["E4:J5"].Value = new object[,]
             {
                {1, 2, 3},
                {4, 5, 6}
             };

            worksheet.Range["I6:J8"].Value = new object[,]
            {
                {2, 2},
                {3, 3},
                {4, 4}
            };

            //O     P      Q
            //2     4      #N/A
            //12    15     #N/A
            //#N/A  #N/A   #N/A
            worksheet.Range["O9:Q11"].FormulaArray = "=E4:G5*I6:J8";

            //judge if Range O9 has array formula.
            if (worksheet.Range["O9"].HasArray)
            {
                //set O9's entire array's interior color.
                var currentarray = worksheet.Range["O9"].CurrentArray;
                currentarray.Interior.Color = Color.Green;
            }
           //save to an excel file
   workbook.Save("UseArrayFormula.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Formulas.UseTableFormula" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:E"].ColumnWidth = 15;
            worksheet.Range["A1:E3"].Value = new object[,]
            {
                {"SalesPerson", "Region",  "SalesAmount", "ComPct", "ComAmt"},
                {"Joe", "North", 260, 0.10, null},
                {"Robert", "South", 660, 0.15, null},
            };

            worksheet.Tables.Add(worksheet.Range["A1:E3"], true);
            worksheet.Tables[0].Name = "DeptSales";
            worksheet.Tables[0].Columns["ComPct"].DataBodyRange.NumberFormat = "0%";

            //Use table formula in table range.
            worksheet.Tables[0].Columns["ComAmt"].DataBodyRange.Formula = "=[@ComPct]*[@SalesAmount]";

            //Use table formula out of table range.
            worksheet.Range["F2"].Formula = "=SUM(DeptSales[@SalesAmount])";
            worksheet.Range["G2"].Formula = "=SUM(DeptSales[[#Data],[SalesAmount]])";
            worksheet.Range["H2"].Formula = "=SUM(DeptSales[SalesAmount])";
            worksheet.Range["I2"].Formula = "=SUM(DeptSales[@ComPct], DeptSales[@ComAmt])";

            //judge if Range F2:I2 have formula.
            for (int i = 5; i &lt;= 8; i++)
            {
                if (worksheet.Range[1, i].HasFormula)
                {
                    worksheet.Range[1, i].Interior.Color = Color.LightBlue;
                }
            }
           //save to an excel file
   workbook.Save("UseTableFormula.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Grouping.ClearOutline" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            //1:20 rows' outline level will be 2.
            worksheet.Range["1:20"].Group();
            //1:10 rows' outline level will be 3.
            worksheet.Range["1:10"].Group();

            //1:20 rows' outline level will be 1.
            worksheet.Range["1:20"].ClearOutline();
           //save to an excel file
   workbook.Save("ClearOutline.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Grouping.CollapseGroup" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            //1:20 rows' outline level will be 2.
            worksheet.Range["1:20"].Group();
            //1:10 rows' outline level will be 3.
            worksheet.Range["1:10"].Group();

            //1:10 rows will be collapsed.
            worksheet.Range["11:11"].ShowDetail = false;
           //save to an excel file
   workbook.Save("CollapseGroup.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Grouping.CreateRangeGroup" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            //1:20 rows' outline level will be 2.
            worksheet.Range["1:20"].Group();
            //1:10 rows' outline level will be 3.
            worksheet.Range["1:10"].Group();

            //A:N columns' outline level will be 2.
            worksheet.Range["A:N"].Group();
            //A:E columns' outline level will be 3.
            worksheet.Range["A:E"].Group();
           //save to an excel file
   workbook.Save("CreateRangeGroup.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Grouping.ShowSpecificLevel" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:N"].Group();
            worksheet.Range["A:F"].Group();
            worksheet.Range["A:C"].Group();

            worksheet.Range["Q:Z"].Group();
            worksheet.Range["Q:T"].Group();

            //level 3 and level 4 will be collapsed. level 2 and level 1 expand.
            worksheet.Outline.ShowLevels(columnLevels: 2);
           //save to an excel file
   workbook.Save("ShowSpecificLevel.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Grouping.UngroupRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            //1:20 rows' outline level will be 2.
            worksheet.Range["1:20"].Group();
            //1:10 rows' outline level will be 3.
            worksheet.Range["1:10"].Group();

            //1:10 rows' outline level will be 2.
            worksheet.Range["1:10"].Ungroup();
            //1:20 rows' outline level will be 1.
            worksheet.Range["1:20"].Ungroup();
           //save to an excel file
   workbook.Save("UngroupRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Hyperlinks.CreateHyperlinks" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:A"].ColumnWidth = 30;

            //add a hyperlink link to web page.
            worksheet.Range["A1:B2"].Hyperlinks.Add(worksheet.Range["A1"],
                                                "http://www.google.com/",
                                                null,
                                                "open google web site.",
                                                "Google");

            //add a hyperlink link to a range in this document.
            worksheet.Range["A3:B4"].Hyperlinks.Add(worksheet.Range["A3"],
                                            null,
                                            "Sheet1!$C$3:$E$4",
                                            "Go to sheet1 C3:E4");

            //add a hyperlink link to email address.
            worksheet.Range["A5:B6"].Hyperlinks.Add(worksheet.Range["A5"],
                                            "mailto:spread.sales@grapecity.com",
                                            null,
                                            "Send an email to spread sales",
                                            "Send an email to spread sales");

            //add a hyperlink link to external file.
            //change the path to real picture file path.
            string path = this.CurrentDirectory + "external.xlsx";
            worksheet.Range["A7:B8"].Hyperlinks.Add(worksheet.Range["A7"],
                                                path,
                                                null,
                                                "link to external.xlsx file.",
                                                "External.xlsx");
           //save to an excel file
   workbook.Save("CreateHyperlinks.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Hyperlinks.DeleteHyperlinks" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:A"].ColumnWidth = 30;

            //add a hyperlink link to web page.
            worksheet.Range["A1:B2"].Hyperlinks.Add(worksheet.Range["A1"],
                                                "http://www.google.com/",
                                                null,
                                                "open google web site.",
                                                "Google");

            //add a hyperlink link to a range in this document.
            worksheet.Range["A3:B4"].Hyperlinks.Add(worksheet.Range["A3"],
                                            null,
                                            "Sheet1!$C$3:$E$4",
                                            "Go to sheet1 C3:E4");

            //add a hyperlink link to email address.
            worksheet.Range["A5:B6"].Hyperlinks.Add(worksheet.Range["A5"],
                                            "mailto:spread.sales@grapecity.com",
                                            null,
                                            "Send an email to spread sales",
                                            "Send an eamil to spread sales");

            //add a hyperlink link to external file.
            //change the path to real picture file path.
            string path = this.CurrentDirectory + "external.xlsx";
            worksheet.Range["A7:B8"].Hyperlinks.Add(worksheet.Range["A7"],
                                                path,
                                                null,
                                                "link to external.xlsx file.",
                                                "External.xlsx");

            //delete hyperlinks in range A1:A2.
            worksheet.Range["A1:A2"].Hyperlinks.Delete();

            //delete all hyperlinks in this worksheet.
            worksheet.Hyperlinks.Delete();
           //save to an excel file
   workbook.Save("DeleteHyperlinks.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Picture.CreatePicture" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            var assembly = this.GetType().GetTypeInfo().Assembly;            
            System.IO.Stream stream = assembly.GetManifestResourceStream("GrapeCity.Documents.Spread.Examples.Resource.logo.png");
            GrapeCity.Documents.Spread.Drawing.IShape picture = worksheet.Shapes.AddPicture(stream, GrapeCity.Documents.Spread.Drawing.ImageType.PNG, 20, 20, 790, 120);

           //save to an excel file
   workbook.Save("CreatePicture.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Picture.DeletePicture" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            var assembly = this.GetType().GetTypeInfo().Assembly;
            System.IO.Stream stream = assembly.GetManifestResourceStream("GrapeCity.Documents.Spread.Examples.Resource.logo.png");
            GrapeCity.Documents.Spread.Drawing.IShape picture = worksheet.Shapes.AddPicture(stream, GrapeCity.Documents.Spread.Drawing.ImageType.PNG, 20, 20, 100, 100);
            //set picture size.
            picture.WidthInPixel = 700;
            picture.HeightInPixel = 120;
            //config picture layout.
            picture.Fill.Solid();
            picture.Fill.Color.ObjectThemeColor = ThemeColor.Accent1;

            //delete picture.
            picture.Delete();
           //save to an excel file
   workbook.Save("DeletePicture.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.PivotTable.ChangeDataFiledSummarizeFunction" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F16"].Value = sourceData;
            worksheet.Range["A:F"].ColumnWidth = 15;
            var pivotcache = workbook.PivotCaches.Create(worksheet.Range["A1:F16"]);
            var pivottable = worksheet.PivotTables.Add(pivotcache, worksheet.Range["L7"], "pivottable1");

            //config pivot table's fields
            var field_Category = pivottable.PivotFields["Category"];
            field_Category.Orientation = PivotFieldOrientation.RowField;

            var field_Product = pivottable.PivotFields["Product"];
            field_Product.Orientation = PivotFieldOrientation.ColumnField;

            var field_Amount = pivottable.PivotFields["Amount"];
            field_Amount.Orientation = PivotFieldOrientation.DataField;

            var field_Country = pivottable.PivotFields["Country"];
            field_Country.Orientation = PivotFieldOrientation.PageField;

            //Change data field's summarize function.
            field_Amount.Function = ConsolidationFunction.Average;

           //save to an excel file
   workbook.Save("ChangeDataFiledSummarizeFunction.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.PivotTable.CreatePivotTable" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F16"].Value = sourceData;
            worksheet.Range["A:F"].ColumnWidth = 15;
            var pivotcache = workbook.PivotCaches.Create(worksheet.Range["A1:F16"]);
            var pivottable = worksheet.PivotTables.Add(pivotcache, worksheet.Range["L7"], "pivottable1");

            //config pivot table's fields
            var field_Category = pivottable.PivotFields["Category"];
            field_Category.Orientation = PivotFieldOrientation.RowField;

            var field_Product = pivottable.PivotFields["Product"];
            field_Product.Orientation = PivotFieldOrientation.ColumnField;

            var field_Amount = pivottable.PivotFields["Amount"];
            field_Amount.Orientation = PivotFieldOrientation.DataField;

            var field_Country = pivottable.PivotFields["Country"];
            field_Country.Orientation = PivotFieldOrientation.PageField;
           //save to an excel file
   workbook.Save("CreatePivotTable.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.PivotTable.FilterItemsInPivotTable" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F16"].Value = sourceData;
            var pivotcache = workbook.PivotCaches.Create(worksheet.Range["A1:F16"]);
            var pivottable = worksheet.PivotTables.Add(pivotcache, worksheet.Range["L7"], "pivottable1");

            var field_product = pivottable.PivotFields[1];
            field_product.Orientation = PivotFieldOrientation.RowField;

            var field_Amount = pivottable.PivotFields[3];
            field_Amount.Orientation = PivotFieldOrientation.DataField;

            var field_Country = pivottable.PivotFields[5];
            field_Country.Orientation = PivotFieldOrientation.PageField;

            //row field filter.
            field_product.PivotItems["Apple"].Visible = false;
            field_product.PivotItems["Beans"].Visible = false;
            field_product.PivotItems["Orange"].Visible = false;

            //page filter.
            field_Country.PivotItems["United States"].Visible = false;
            field_Country.PivotItems["Canada"].Visible = false;
           //save to an excel file
   workbook.Save("FilterItemsInPivotTable.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.PivotTable.ModifySubtotalsForPivotField" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F16"].Value = sourceData;
            var pivotcache = workbook.PivotCaches.Create(worksheet.Range["A1:F16"]);
            var pivottable = worksheet.PivotTables.Add(pivotcache, worksheet.Range["L7"], "pivottable1");

            var field_Category = pivottable.PivotFields[2];
            field_Category.Orientation = PivotFieldOrientation.RowField;

            var field_Product = pivottable.PivotFields[1];
            field_Product.Orientation = PivotFieldOrientation.RowField;

            var field_Amount = pivottable.PivotFields[3];
            field_Amount.Orientation = PivotFieldOrientation.DataField;

            //modify subtotals for pivot field.
            field_Category.Subtotals = SubtotalType.Sum | SubtotalType.Count | SubtotalType.Average | SubtotalType.Max |
                                        SubtotalType.Min | SubtotalType.Product | SubtotalType.CountNums | SubtotalType.StdDev |
                                        SubtotalType.StdDevP | SubtotalType.Var | SubtotalType.VarP;

           //save to an excel file
   workbook.Save("ModifySubtotalsForPivotField.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.PivotTable.RefreshPivotTable" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F16"].Value = sourceData;
            var pivotcache = workbook.PivotCaches.Create(worksheet.Range["A1:F16"]);
            var pivottable = worksheet.PivotTables.Add(pivotcache, worksheet.Range["L7"], "pivottable1");

            var field_product = pivottable.PivotFields["Product"];
            field_product.Orientation = PivotFieldOrientation.RowField;

            var field_Amount = pivottable.PivotFields[3];
            field_Amount.Orientation = PivotFieldOrientation.DataField;

            //change pivot cache's source data.
            worksheet.Range["D8"].Value = 3000;

            //sync cache's data to pivot table.
            worksheet.PivotTables[0].Refresh();
           //save to an excel file
   workbook.Save("RefreshPivotTable.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.AccessCellsRowsColumns" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            var range = worksheet.Range["A5:B7"];

            //set value for cell A7.
            var cell = range.Cells[4];
            cell.Value = 1;

            //set interior color for row range A6:B6.
            var row = range.Rows[1];
            row.Interior.Color = Color.LightBlue;

            //set values for column range B5:B7.
            var column = range.Columns[1];
            column.Value = 2;
           //save to an excel file
   workbook.Save("AccessCellsRowsColumns.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.AccessEachAreaOfRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            var range = worksheet.Range["A5:B7, C3, H5:N6"];

            //set interior color for area1 A5:B7.
            var area1 = worksheet.Range["A5:B7, C3, H5:N6"].Areas[0];
            area1.Interior.Color = Color.Pink;

            //set interior color for area2 C3.
            var area2 = worksheet.Range["A5:B7, C3, H5:N6"].Areas[1];
            area2.Interior.Color = Color.LightGreen;

            //set interior color for area3 H5:N6.
            var area3 = worksheet.Range["A5:B7, C3, H5:N6"].Areas[2];
            area3.Interior.Color = Color.LightBlue;
           //save to an excel file
   workbook.Save("AccessEachAreaOfRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.AccessRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //use index to access range, Range A1.
            worksheet.Range[0, 0].Interior.Color = Color.LightGreen;
            worksheet.Range[0, 0, 2, 2].Value = 5;

            //use string to access range.
            worksheet.Range["A2"].Interior.Color = Color.LightYellow;
            worksheet.Range["C3:D4"].Interior.Color = Color.Tomato;
            worksheet.Range["A5:B7, C3, H5:N6"].Value = 2;

            //use Cells to access range.
            worksheet.Cells[5].Interior.Color = Color.LightBlue;
           //save to an excel file
   workbook.Save("AccessRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.CutCopyRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            IWorksheet worksheet2 = workbook.Worksheets.Add();

            worksheet.Range["B3:D12"].Value = 5;
            worksheet.Range["B3:D12"].Interior.Color = Color.LightGreen;

            //Copy
            worksheet.Range["B3:D12"].Copy(worksheet.Range["E5"]);

            //Cut
            worksheet.Range["B3:D12"].Cut(worksheet.Range["I5:K14"]);

            worksheet.Range["I1:K2"].Value = 2;
            worksheet.Range["I1:K2"].Interior.Color = Color.Pink;

            //cross sheet cut copy.
            worksheet.Range["I1:K2"].Cut(worksheet2.Range["H5"]);
            worksheet.Range["G4:H5"].Copy(worksheet2.Range["A1"]);
           //save to an excel file
   workbook.Save("CutCopyRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.GetFeatureRelatedUsedRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["A1:B2"].Value = new object[,]
            {
                {1, 2},
                {"aaa", "bbb"}
            };
            worksheet.Range["A2:C3"].Interior.Color = Color.Green;

            //style used range is A2:C3.
            var UsedRange_style = worksheet.GetUsedRange(UsedRangeType.Style);
            UsedRange_style.Interior.Color = Color.LightBlue;
           //save to an excel file
   workbook.Save("GetFeatureRelatedUsedRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.GetRangeRowCountColumnCount" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            var range = worksheet.Range["A5:B7"];

            //cell count is 6.
            var cellcount = range.Count;
            //cell count is 6.
            var cellcount1 = range.Cells.Count;
            //row count is 3.
            var rowcount = range.Rows.Count;
            //column count is 2.
            var columncount = range.Columns.Count;

           //save to an excel file
   workbook.Save("GetRangeRowCountColumnCount.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.GetWorksheetUsedRange" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            worksheet.Range["H6:M7"].Value = 1;
            worksheet.Range["J9:J10"].Merge();

            //set interior color for worksheet usedRange "H6:M10".
            var usedrange = worksheet.UsedRange;
            usedrange.Interior.Color = Color.LightBlue;
           //save to an excel file
   workbook.Save("GetWorksheetUsedRange.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.HiddenRowColumn" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["E1"].Value = 1;

            //Hidden row 2:6.
            worksheet.Range["2:6"].Hidden = true;

            //Hidden column A:D.
            worksheet.Range["A:D"].Hidden = true;
           //save to an excel file
   workbook.Save("HiddenRowColumn.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.InsertCellsDeleteCells" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet1 = workbook.Worksheets[0];
            IWorksheet worksheet2 = workbook.Worksheets.Add();

            var data = new object[,]
            {
                {1, 2, 3},
                {4, 5, 6},
                {7, 8, 9}
            };

            worksheet1.Range["A1:C3"].Value = data;
            worksheet2.Range["A1:C3"].Value = data;

            //Insert cells
            worksheet1.Range["A2"].Insert();//Auto
            worksheet1.Range["B2"].Insert(InsertShiftDirection.Down);
            worksheet1.Range["C2"].Insert(InsertShiftDirection.Right);

            //Delete cells
            worksheet2.Range["A2"].Delete();//Auto
            worksheet2.Range["B2"].Delete(DeleteShiftDirection.Left);
            worksheet2.Range["C2"].Delete(DeleteShiftDirection.Up);
           //save to an excel file
   workbook.Save("InsertCellsDeleteCells.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.InsertDeleteRowsColumns" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet1 = workbook.Worksheets[0];
            IWorksheet worksheet2 = workbook.Worksheets.Add();

            var data = new object[,]
            {
                {1, 2, 3},
                {4, 5, 6},
                {7, 8, 9}
            };

            worksheet1.Range["A1:C3"].Value = data;
            worksheet2.Range["A1:C3"].Value = data;

            //Insert rows
            worksheet1.Range["A2:B2"].EntireRow.Insert();
            worksheet1.Range["3:5"].Insert();

            //Insert columns
            worksheet1.Range["B3:B5"].EntireColumn.Insert();
            worksheet1.Range["A:A"].Insert();

            //Delete rows
            worksheet2.Range["A3:A5"].EntireRow.Delete();
            worksheet2.Range["2:4"].Delete();

            //Delete columns
            worksheet2.Range["B3:B5"].EntireColumn.Delete();
            worksheet2.Range["A:A"].Delete();
           //save to an excel file
   workbook.Save("InsertDeleteRowsColumns.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.MergeCells" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //A1:C4 is a single merged cell.
            worksheet.Range["A1:C4"].Merge();
            //H5:J5 is a single merged cell.
            //H6:J6 is a single merged cell.
            worksheet.Range["H5:J6"].Merge(true);

            //select A1:H5's entire merge area A1:J5, entire merge area is a bounding rectangle.
            var entireMergeArea = worksheet.Range["A1:H5"].EntireMergeArea;
            entireMergeArea.Select();

            //judge if H5 is a merged cell.
            if (worksheet.Range["J5"].MergeCells)
            {
                //set value to the top left cell of the merge area.
                worksheet.Range["J5"].EntireMergeArea[0, 0].Value = 1;
            }
           //save to an excel file
   workbook.Save("MergeCells.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.SetRangeValue" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 15;
            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            //set two-dimension array value to range A1:F7
            worksheet.Range["A1:F7"].Value = data;

            //return a two-dimension array when get range A1:B7's value.
            var result = worksheet.Range["A1:B7"].Value;

           //save to an excel file
   workbook.Save("SetRangeValue.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.RangeOperations.SetRowHeightColumnWidth" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //set row height for row 1:2.
            worksheet.Range["1:2"].RowHeight = 50;

            //set column width for column C:D.
            worksheet.Range["C:D"].ColumnWidth = 20;
           //save to an excel file
   workbook.Save("SetRowHeightColumnWidth.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.ConfigShape3DFormat" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Heart, 1, 1, 100, 100);
            shape.ThreeD.RotationX = 50;
            shape.ThreeD.RotationY = 20;
            shape.ThreeD.RotationZ = 30;
            shape.ThreeD.Depth = 7;
            shape.ThreeD.Z = 20;
           //save to an excel file
   workbook.Save("ConfigShape3DFormat.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.ConfigShapeLine" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Heart, 1, 1, 100, 100);
            shape.Line.DashStyle = GrapeCity.Documents.Spread.Drawing.LineDashStyle.Dash;
            shape.Line.Style = GrapeCity.Documents.Spread.Drawing.LineStyle.Single;
            shape.Line.Weight = 2;
            shape.Line.Color.ObjectThemeColor = ThemeColor.Accent6;
            shape.Line.Transparency = 0.3;
           //save to an excel file
   workbook.Save("ConfigShapeLine.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.ConfigShapeWithGradientFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Heart, 1, 1, 100, 100);
            shape.Fill.PresetGradient(GrapeCity.Documents.Spread.Drawing.GradientStyle.Vertical, 3, GrapeCity.Documents.Spread.Drawing.PresetGradientType.Silver);
            shape.Fill.RotateWithObject = false;
           //save to an excel file
   workbook.Save("ConfigShapeWithGradientFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.ConfigShapeWithPatternFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Heart, 1, 1, 100, 100);
            shape.Fill.Patterned(GrapeCity.Documents.Spread.Drawing.PatternType.Percent10);
            shape.Fill.Color.ObjectThemeColor = ThemeColor.Accent2;
            shape.Fill.PatternColor.ObjectThemeColor = ThemeColor.Accent6;
           //save to an excel file
   workbook.Save("ConfigShapeWithPatternFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.ConfigShapeWithPictureFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Rectangle, 20, 20, 100, 100);

            var assembly = this.GetType().GetTypeInfo().Assembly;
            System.IO.Stream stream = assembly.GetManifestResourceStream("GrapeCity.Documents.Spread.Examples.Resource.logo.png");

            shape.Fill.UserPicture(stream, GrapeCity.Documents.Spread.Drawing.ImageType.JPG);
            shape.PictureFormat.ColorType = GrapeCity.Documents.Spread.Drawing.PictureColorType.Grayscale;
            shape.PictureFormat.Brightness = 0.6;
            shape.PictureFormat.Contrast = 0.3;
            shape.PictureFormat.Crop.PictureOffsetX = 10;
            shape.PictureFormat.Crop.PictureOffsetY = -5;
            shape.PictureFormat.Crop.PictureWidth = 120;
            shape.PictureFormat.Crop.PictureHeight = 80;
           //save to an excel file
   workbook.Save("ConfigShapeWithPictureFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.ConfigShapeWithSolidFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Heart, 1, 1, 100, 100);
            shape.Fill.Solid();
            shape.Fill.Color.RGB = Color.Red;
           //save to an excel file
   workbook.Save("ConfigShapeWithSolidFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.ConfigShapeWithTextureFill" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Heart, 1, 1, 100, 100);
            shape.Fill.PresetTextured(GrapeCity.Documents.Spread.Drawing.PresetTexture.Canvas);
            shape.Fill.TextureAlignment = GrapeCity.Documents.Spread.Drawing.TextureAlignment.Center;
            shape.Fill.TextureOffsetX = 2.5;
            shape.Fill.TextureOffsetY = 3.2;
            shape.Fill.TextureHorizontalScale = 0.9;
            shape.Fill.TextureVerticalScale = 0.2;
            shape.Fill.Transparency = 0.5;
           //save to an excel file
   workbook.Save("ConfigShapeWithTextureFill.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.ConnectShapesByConnector" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape ShapeBegin = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Rectangle, 1, 1, 100, 100);
            GrapeCity.Documents.Spread.Drawing.IShape EndBegin = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Rectangle, 200, 200, 100, 100);
            GrapeCity.Documents.Spread.Drawing.IShape ConnectorShape = worksheet.Shapes.AddConnector(GrapeCity.Documents.Spread.Drawing.ConnectorType.Straight, 1, 1, 101, 101);

            //connect shapes by connector shape.
            ConnectorShape.ConnectorFormat.BeginConnect(ShapeBegin, 3);
            ConnectorShape.ConnectorFormat.EndConnect(EndBegin, 0);
           //save to an excel file
   workbook.Save("ConnectShapesByConnector.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Shape.SetShapeText" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];
            GrapeCity.Documents.Spread.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Spread.Drawing.AutoShapeType.Heart, 1, 1, 100, 100);
            shape.Width = 600;
            shape.Height = 300;

            shape.TextFrame.TextRange.Font.Color.RGB = GrapeCity.Documents.Spread.Color.FromRGB(0, 255, 0);
            shape.TextFrame.TextRange.Font.Bold = true;
            shape.TextFrame.TextRange.Font.Italic = true;
            shape.TextFrame.TextRange.Font.Size = 20;
            shape.TextFrame.TextRange.Font.Strikethrough = true;

            shape.TextFrame.TextRange.Paragraphs.Add("This is a rectangle shape.");
            shape.TextFrame.TextRange.Paragraphs.Add("My name is xxx.");
            shape.TextFrame.TextRange.Paragraphs[1].Runs.Add("Hello World!");

            shape.TextFrame.TextRange.Paragraphs[1].Runs[0].Font.Strikethrough = false;
            shape.TextFrame.TextRange.Paragraphs[1].Runs[0].Font.Size = 35;
           //save to an excel file
   workbook.Save("SetShapeText.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Slicer.AddCustomSlicerStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["A1:F16"].Value = sourceData;
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F16"], true);

            //create slicer cache for table.
            ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");

            //add slicer
            ISlicer slicer = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "cate2", "Category", 30, 550, 100, 200);

            //create custom slicer style.
            ITableStyle slicerStyle = workbook.TableStyles.Add("test");
            //set ShowAsAvailableSlicerStyle to true, the style will be treated as slicer style.
            slicerStyle.ShowAsAvailableSlicerStyle = true;
            slicerStyle.TableStyleElements[TableStyleElementType.WholeTable].Font.Name = "Arial";
            slicerStyle.TableStyleElements[TableStyleElementType.WholeTable].Font.Bold = false;
            slicerStyle.TableStyleElements[TableStyleElementType.WholeTable].Font.Italic = false;
            slicerStyle.TableStyleElements[TableStyleElementType.WholeTable].Font.Color = Color.White;
            slicerStyle.TableStyleElements[TableStyleElementType.WholeTable].Borders.Color = Color.LightPink;
            slicerStyle.TableStyleElements[TableStyleElementType.WholeTable].Interior.Color = Color.LightGreen;

            //set slicer style to custom style.
            slicer.Style = slicerStyle;
           //save to an excel file
   workbook.Save("AddCustomSlicerStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Slicer.AddSlicersForPivotTable" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F16"].Value = sourceData;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //Create pivot cache.
            IPivotCache pivotcache = workbook.PivotCaches.Create(worksheet.Range["A1:F16"]);
            //Create pivot tables.
            IPivotTable pivottable1 = worksheet.PivotTables.Add(pivotcache, worksheet.Range["K5"], "pivottable1");
            IPivotTable pivottable2 = worksheet.PivotTables.Add(pivotcache, worksheet.Range["O15"], "pivottable2");

            //Config pivot fields
            IPivotField field_product1 = pivottable1.PivotFields[1];
            field_product1.Orientation = PivotFieldOrientation.RowField;

            IPivotField field_Amount1 = pivottable1.PivotFields[3];
            field_Amount1.Orientation = PivotFieldOrientation.DataField;

            IPivotField field_product2 = pivottable2.PivotFields[5];
            field_product2.Orientation = PivotFieldOrientation.RowField;

            IPivotField field_Amount2 = pivottable2.PivotFields[2];
            field_Amount2.Orientation = PivotFieldOrientation.DataField;
            field_Amount2.Function = ConsolidationFunction.Count;

            //create slicer cache, the slicers base the slicer cache just control pivot table1.
            ISlicerCache cache = workbook.SlicerCaches.Add(pivottable1, "Product");
            ISlicer slicer1 = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "p1", "Product", 30, 550, 100, 200);

            //add pivot table2 for slicer cache, the slicers base the slicer cache will control pivot tabl1 and pivot table2.
            cache.PivotTables.AddPivotTable(pivottable2);
           //save to an excel file
   workbook.Save("AddSlicersForPivotTable.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Slicer.AddSlicersForTable" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["A1:F16"].Value = sourceData;
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F16"], true);
            //create slicer cache for table.
            ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");

            //add two slicers for Category column.
            ISlicer slicer1 = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "cate1", "Category", 30, 550, 100, 200);
            ISlicer slicer2 = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "cate2", "Category", 30, 700, 100, 200);
           //save to an excel file
   workbook.Save("AddSlicersForTable.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Slicer.ApplySlicerStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["A1:F16"].Value = sourceData;
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F16"], true);

            //create slicer cache for table.
            ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");

            //add slicer
            ISlicer slicer = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "cate1", "Category", 30, 550, 100, 200);

            //set slicer style to build in style.
            slicer.Style = workbook.TableStyles["SlicerStyleLight2"];
           //save to an excel file
   workbook.Save("ApplySlicerStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Slicer.ConfigSlicerLayout" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["A1:F16"].Value = sourceData;
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F16"], true);
            //create slicer cache for table.
            ISlicerCache cache = workbook.SlicerCaches.Add(table, "Product", "productCache");

            //add slicer
            ISlicer slicer1 = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "product1", "Product", 30, 550, 100, 200);

            //config slicer's layout.
            slicer1.NumberOfColumns = 2;
            slicer1.RowHeight = 25;
            slicer1.DisplayHeader = false;
            slicer1.Shape.Placement = GrapeCity.Documents.Spread.Drawing.Placement.Move;
           //save to an excel file
   workbook.Save("ConfigSlicerLayout.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Slicer.DoTableFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["A1:F16"].Value = sourceData;
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F16"], true);

            //create slicer cache for table.
            ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");

            //add slicer
            ISlicer slicer1 = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "cate1", "Category", 20, 550, 100, 200);

            //Apply table filter, this will synchronize to the slicer, the slicer1's selected item is "Fruit".
            worksheet.Range["A1:F16"].AutoFilter(2, "Fruit");
           //save to an excel file
   workbook.Save("DoTableFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Slicer.UseSlicerDoFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["A1:F16"].Value = sourceData;
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F16"], true);

            //create slicer cache for table.
            ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");

            //add slicer
            ISlicer slicer1 = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "cate1", "Category", 30, 550, 100, 200);

            //do filter operation. filter out vegetables.
            slicer1.SlicerCache.SlicerItems["Vegetables"].Selected = false;
           //save to an excel file
   workbook.Save("UseSlicerDoFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Slicer.UseSlicerToClearFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] sourceData = new object[,] {
                { "Order ID", "Product",  "Category",   "Amount", "Date",                    "Country" },
                { 1,          "Carrots",  "Vegetables",  4270,    new DateTime(2012, 1, 6),  "United States" },
                { 2,          "Broccoli", "Vegetables",  8239,    new DateTime(2012, 1, 7),  "United Kingdom" },
                { 3,          "Banana",   "Fruit",       617,     new DateTime(2012, 1, 8),  "United States" },
                { 4,          "Banana",   "Fruit",       8384,    new DateTime(2012, 1, 10), "Canada" },
                { 5,          "Beans",    "Vegetables",  2626,    new DateTime(2012, 1, 10), "Germany" },
                { 6,          "Orange",   "Fruit",       3610,    new DateTime(2012, 1, 11), "United States" },
                { 7,          "Broccoli", "Vegetables",  9062,    new DateTime(2012, 1, 11), "Australia" },
                { 8,          "Banana",   "Fruit",       6906,    new DateTime(2012, 1, 16), "New Zealand" },
                { 9,          "Apple",    "Fruit",       2417,    new DateTime(2012, 1, 16), "France" },
                { 10,         "Apple",    "Fruit",       7431,    new DateTime(2012, 1, 16), "Canada" },
                { 11,         "Banana",   "Fruit",       8250,    new DateTime(2012, 1, 16), "Germany" },
                { 12,         "Broccoli", "Vegetables",  7012,    new DateTime(2012, 1, 18), "United States" },
                { 13,         "Carrots",  "Vegetables",  1903,    new DateTime(2012, 1, 20), "Germany" },
                { 14,         "Broccoli", "Vegetables",  2824,    new DateTime(2012, 1, 22), "Canada" },
                { 15,         "Apple",    "Fruit",       6946,    new DateTime(2012, 1, 24), "France" },
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["A1:F16"].Value = sourceData;
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F16"], true);

            //create slicer cache for table.
            ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");

            //add slicer
            ISlicer slicer1 = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "cate1", "Category", 30, 550, 100, 200);

            //do filter operation. filter out vegetables.
            slicer1.SlicerCache.SlicerItems["Vegetables"].Selected = false;

            //clear slicer filter.
            slicer1.SlicerCache.ClearAllFilters();
           //save to an excel file
   workbook.Save("UseSlicerToClearFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sorting.CustomSort" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //give a custom sort values string. "Eva" and "Cherry" should be the top1 and top2.
            var sortkey = new ValueSortField(worksheet.Range["A2:A7"], "\"Eva\", \"Cherry\"");
            worksheet.Range["A2:F7"].Sort(SortOrientation.Columns, false, sortkey);
           //save to an excel file
   workbook.Save("CustomSort.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sorting.SortRangeByFontColor" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["F2"].Font.Color = Color.Red;
            worksheet.Range["F3"].Font.Color = Color.Gainsboro;
            worksheet.Range["F4"].Font.Color = Color.Green;
            worksheet.Range["F5"].Font.Color = Color.Gainsboro;
            worksheet.Range["F6"].Font.Color = Color.Gainsboro;
            worksheet.Range["F7"].Font.Color = Color.Gainsboro;

            //The font colors which are same to "F7" cell's color will in the top.
            worksheet.Sort.SortFields.Add(new FontColorSortField(worksheet.Range["F2:F7"], worksheet.Range["F7"].Font.Color, SortOrder.Ascending));
            worksheet.Sort.Range = worksheet.Range["A2:F7"];
            worksheet.Sort.Orientation = SortOrientation.Columns;
            worksheet.Sort.Apply();
           //save to an excel file
   workbook.Save("SortRangeByFontColor.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sorting.SortRangeByIcon" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            IIconSetCondition iconset = worksheet.Range["F2:F7"].FormatConditions.AddIconSetCondition();
            iconset.IconSet = workbook.IconSets[IconSetType.Icon3TrafficLights1];

            //green traffic light will in the top.
            worksheet.Sort.SortFields.Add(new IconSortField(worksheet.Range["F2:F7"], workbook.IconSets[IconSetType.Icon3TrafficLights1][2], SortOrder.Ascending));
            worksheet.Sort.Range = worksheet.Range["A2:F7"];
            worksheet.Sort.Orientation = SortOrientation.Columns;
            worksheet.Sort.Apply();

           //save to an excel file
   workbook.Save("SortRangeByIcon.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sorting.SortRangeByInterior" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            worksheet.Range["F2"].Interior.Color = Color.LightPink;
            worksheet.Range["F3"].Interior.Color = Color.LightGreen;
            worksheet.Range["F4"].Interior.Color = Color.LightPink;
            worksheet.Range["F5"].Interior.Color = Color.LightGreen;
            worksheet.Range["F6"].Interior.Color = Color.LightBlue;
            worksheet.Range["F7"].Interior.Color = Color.LightPink;
            
            //"F4" will in the top.
            worksheet.Sort.SortFields.Add(new CellColorSortField(worksheet.Range["F2:F7"], worksheet.Range["F4"].DisplayFormat.Interior, SortOrder.Ascending));
            worksheet.Sort.Range = worksheet.Range["A2:F7"];
            worksheet.Sort.Orientation = SortOrientation.Columns;
            worksheet.Sort.Apply();
           //save to an excel file
   workbook.Save("SortRangeByInterior.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sorting.SortRangeByValue" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //Sort by column F, ascending.
            worksheet.Range["A2:F7"].Sort(worksheet.Range["F2:F7"], SortOrder.Ascending, SortOrientation.Columns);
           //save to an excel file
   workbook.Save("SortRangeByValue.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sparklines.ClearSparklineGroup" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]
            {
                {"Number", "Date", "Customer", "Description", "Amount", "0-30 Days", "30-60 Days", "60-90 Days", "&gt;90 Days", "Trend"},
                {"1001", new DateTime(2017, 5, 21), "Customer A", "Invoice 1001", null, 1200.15, 1916.18, 1105.23, 1806.53, null},
                {"1002", new DateTime(2017, 3, 18), "Customer B", "Invoice 1002", null, 896.23, 1005.53, 1800.56, 1150.49, null},
                {"1003", new DateTime(2017, 6, 15), "Customer C", "Invoice 1003", null, 827.63, 1009.23, 1869.23, 1002.56, null}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B2:K5"].Value = data;
            worksheet.Range["B:K"].ColumnWidth = 15;

            worksheet.Tables.Add(worksheet.Range["B2:K5"], true);
            worksheet.Tables[0].Columns[4].DataBodyRange.Formula = "=SUM(Table1[@[0-30 Days]:[&gt;90 Days]])";

            //create a new group of sparklines.
            worksheet.Range["K3"].SparklineGroups.Add(SparkType.Line, "G3:J3");
            //create another new group of sparklines.
            worksheet.Range["K4:K5"].SparklineGroups.Add(SparkType.Column, "G4:J5");

            //clear K11 and K12 cell's sparkline. K13 cell's sparkline still exist.
            worksheet.Range["K3, K4"].SparklineGroups.ClearGroups();
           //save to an excel file
   workbook.Save("ClearSparklineGroup.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sparklines.ClearSparklines" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]
            {
                {"Number", "Date", "Customer", "Description", "Amount", "0-30 Days", "30-60 Days", "60-90 Days", "&gt;90 Days", "Trend"},
                {"1001", new DateTime(2017, 5, 21), "Customer A", "Invoice 1001", null, 1200.15, 1916.18, 1105.23, 1806.53, null},
                {"1002", new DateTime(2017, 3, 18), "Customer B", "Invoice 1002", null, 896.23, 1005.53, 1800.56, 1150.49, null},
                {"1003", new DateTime(2017, 6, 15), "Customer C", "Invoice 1003", null, 827.63, 1009.23, 1869.23, 1002.56, null}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B2:K5"].Value = data;
            worksheet.Range["B:K"].ColumnWidth = 15;

            worksheet.Tables.Add(worksheet.Range["B2:K5"], true);
            worksheet.Tables[0].Columns[4].DataBodyRange.Formula = "=SUM(Table1[@[0-30 Days]:[&gt;90 Days]])";

            //create a new group of sparklines.
            worksheet.Range["K3"].SparklineGroups.Add(SparkType.Line, "G3:J3");
            //create another new group of sparklines.
            worksheet.Range["K4:K5"].SparklineGroups.Add(SparkType.Column, "G4:J5");

            //clear K11 and K12 cell's sparkline. K13 cell's sparkline still exist.
            worksheet.Range["K3, K4"].SparklineGroups.Clear();
           //save to an excel file
   workbook.Save("ClearSparklines.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sparklines.ConfigSparklineSettings" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]
            {
                {"Number", "Date", "Customer", "Description", "Amount", "0-30 Days", "30-60 Days", "60-90 Days", "&gt;90 Days", "Trend"},
                {"1001", new DateTime(2017, 5, 21), "Customer A", "Invoice 1001", null, 1200.15, 1916.18, 1105.23, 1806.53, null},
                {"1002", new DateTime(2017, 3, 18), "Customer B", "Invoice 1002", null, 896.23, 1005.53, 1800.56, 1150.49, null},
                {"1003", new DateTime(2017, 6, 15), "Customer C", "Invoice 1003", null, 827.63, 1009.23, 1869.23, 1002.56, null}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B2:K5"].Value = data;
            worksheet.Range["B:K"].ColumnWidth = 15;

            worksheet.Tables.Add(worksheet.Range["B2:K5"], true);
            worksheet.Tables[0].Columns[4].DataBodyRange.Formula = "=SUM(Table1[@[0-30 Days]:[&gt;90 Days]])";

            //create a new group of sparklines.
            worksheet.Range["K3:K5"].SparklineGroups.Add(SparkType.Line, "G3:J5");
            var sparklinegroup = worksheet.Range["K3"].SparklineGroups[0];

            //Config sparkline settings.
            sparklinegroup.LineWeight = 2.5;
            sparklinegroup.Points.Markers.Color.ThemeColor = ThemeColor.Accent2;
            sparklinegroup.Points.Markers.Visible = true;
            sparklinegroup.SeriesColor.ThemeColor = ThemeColor.Accent6;
           //save to an excel file
   workbook.Save("ConfigSparklineSettings.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sparklines.CreateSparklines" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]
            {
                {"Number", "Date", "Customer", "Description", "Amount", "0-30 Days", "30-60 Days", "60-90 Days", "&gt;90 Days", "Trend"},
                {"1001", new DateTime(2017, 5, 21), "Customer A", "Invoice 1001", null, 1200.15, 1916.18, 1105.23, 1806.53, null},
                {"1002", new DateTime(2017, 3, 18), "Customer B", "Invoice 1002", null, 896.23, 1005.53, 1800.56, 1150.49, null},
                {"1003", new DateTime(2017, 6, 15), "Customer C", "Invoice 1003", null, 827.63, 1009.23, 1869.23, 1002.56, null}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B2:K5"].Value = data;
            worksheet.Range["B:K"].ColumnWidth = 15;

            worksheet.Tables.Add(worksheet.Range["B2:K5"], true);
            worksheet.Tables[0].Columns[4].DataBodyRange.Formula = "=SUM(Table1[@[0-30 Days]:[&gt;90 Days]])";

            //create a new group of sparklines.
            worksheet.Range["K3:K5"].SparklineGroups.Add(SparkType.Line, "G3:J5");  
           //save to an excel file
   workbook.Save("CreateSparklines.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sparklines.GroupExistSparklines" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]
            {
                {"Number", "Date", "Customer", "Description", "Amount", "0-30 Days", "30-60 Days", "60-90 Days", "&gt;90 Days", "Trend"},
                {"1001", new DateTime(2017, 5, 21), "Customer A", "Invoice 1001", null, 1200.15, 1916.18, 1105.23, 1806.53, null},
                {"1002", new DateTime(2017, 3, 18), "Customer B", "Invoice 1002", null, 896.23, 1005.53, 1800.56, 1150.49, null},
                {"1003", new DateTime(2017, 6, 15), "Customer C", "Invoice 1003", null, 827.63, 1009.23, 1869.23, 1002.56, null}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B2:K5"].Value = data;
            worksheet.Range["B:K"].ColumnWidth = 15;

            worksheet.Tables.Add(worksheet.Range["B2:K5"], true);
            worksheet.Tables[0].Columns[4].DataBodyRange.Formula = "=SUM(Table1[@[0-30 Days]:[&gt;90 Days]])";

            //create a new group of sparklines.
            worksheet.Range["K3"].SparklineGroups.Add(SparkType.Line, "G3:J3");
            //create another new group of sparklines.
            worksheet.Range["K4:K5"].SparklineGroups.Add(SparkType.Column, "G4:J5");

            //Create a new group, group exist sparklines, according to Range["K12"]'s sparkline group setting.
            worksheet.Range["K3:K5"].SparklineGroups.Group(worksheet.Range["K4"]);
           //save to an excel file
   workbook.Save("GroupExistSparklines.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Sparklines.UseDateAxis" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]
            {
                {"Number", "Date", "Customer", "Description", "Amount", "0-30 Days", "30-60 Days", "60-90 Days", "&gt;90 Days", "Trend"},
                {"1001", new DateTime(2017, 5, 21), "Customer A", "Invoice 1001", null, 1200.15, 1916.18, 1105.23, 1806.53, null},
                {"1002", new DateTime(2017, 3, 18), "Customer B", "Invoice 1002", null, 896.23, 1005.53, 1800.56, 1150.49, null},
                {"1003", new DateTime(2017, 6, 15), "Customer C", "Invoice 1003", null, 827.63, 1009.23, 1869.23, 1002.56, null}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["B2:K5"].Value = data;
            worksheet.Range["B:K"].ColumnWidth = 15;

            worksheet.Tables.Add(worksheet.Range["B2:K5"], true);
            worksheet.Tables[0].Columns[4].DataBodyRange.Formula = "=SUM(Table1[@[0-30 Days]:[&gt;90 Days]])";

            //create a new group of sparklines.
            worksheet.Range["K3:K5"].SparklineGroups.Add(SparkType.Line, "G3:J5");

            worksheet.Range["G7:J7"].Value = new object[] { new DateTime(2011, 12, 16), new DateTime(2011, 12, 17), new DateTime(2011, 12, 18), new DateTime(2011, 12, 19) };
            worksheet.Range["K3"].SparklineGroups[0].DateRange = "G7:J7";
            worksheet.Range["K3"].SparklineGroups[0].Axes.Horizontal.Axis.Visible = true;
            worksheet.Range["K3"].SparklineGroups[0].Axes.Horizontal.Axis.Color.Color = Color.Green;
           //save to an excel file
   workbook.Save("UseDateAxis.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.AccessTableRanges" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //add table.
            worksheet.Tables.Add(worksheet.Range["A1:F7"], true);

            //show totals
            worksheet.Tables[0].ShowTotals = true;

            //set each range's interior color.
            worksheet.Tables[0].HeaderRange.Interior.Color = Color.Green;
            worksheet.Tables[0].DataRange.Interior.Color = Color.Pink;
            worksheet.Tables[0].TotalsRange.Interior.Color = Color.LightGray;
           //save to an excel file
   workbook.Save("AccessTableRanges.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.AddCustomTableStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Add one custom table style.
            ITableStyle style = workbook.TableStyles.Add("test");

            //Set WholeTable element style.
            style.TableStyleElements[TableStyleElementType.WholeTable].Font.Italic = true;
            style.TableStyleElements[TableStyleElementType.WholeTable].Font.ThemeColor = ThemeColor.Accent6;
            style.TableStyleElements[TableStyleElementType.WholeTable].Font.Strikethrough = true;
            style.TableStyleElements[TableStyleElementType.WholeTable].Borders.LineStyle = BorderLineStyle.Dotted;
            style.TableStyleElements[TableStyleElementType.WholeTable].Borders.ThemeColor = ThemeColor.Accent2;
            style.TableStyleElements[TableStyleElementType.WholeTable].Interior.Color = Color.FromRGB(24, 232, 192);

            //Set FirstColumnStripe element style.
            style.TableStyleElements[TableStyleElementType.FirstColumnStripe].Font.Bold = true;
            style.TableStyleElements[TableStyleElementType.FirstColumnStripe].Font.Color = Color.FromRGB(255, 0, 0);
            style.TableStyleElements[TableStyleElementType.FirstColumnStripe].Borders.LineStyle = BorderLineStyle.Thick;
            style.TableStyleElements[TableStyleElementType.FirstColumnStripe].Borders.ThemeColor = ThemeColor.Accent5;
            style.TableStyleElements[TableStyleElementType.FirstColumnStripe].Interior.Color = Color.FromRGB(255, 255, 0);
            style.TableStyleElements[TableStyleElementType.FirstColumnStripe].StripeSize = 2;

            //Set SecondColumnStripe element style.
            style.TableStyleElements[TableStyleElementType.SecondColumnStripe].Font.Color = Color.FromRGB(255, 0, 255);
            style.TableStyleElements[TableStyleElementType.SecondColumnStripe].Borders.LineStyle = BorderLineStyle.DashDot;
            style.TableStyleElements[TableStyleElementType.SecondColumnStripe].Borders.Color = Color.FromRGB(42, 105, 162);
            style.TableStyleElements[TableStyleElementType.SecondColumnStripe].Interior.Color = Color.FromRGB(204, 204, 255);

            //add table.
            IWorksheet worksheet = workbook.Worksheets[0];
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F7"], true);
            worksheet.Range["A:F"].ColumnWidth = 15;

            //set custom table style to table.
            table.TableStyle = style;
           //save to an excel file
   workbook.Save("AddCustomTableStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.ApplyTableStyle" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //add table.
            IWorksheet worksheet = workbook.Worksheets[0];
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F7"], true);
            worksheet.Range["A:F"].ColumnWidth = 15;

            //Add one custom table style.
            ITableStyle style = workbook.TableStyles.Add("test");
            //set custom table style for table.
            table.TableStyle = style;

            //Use table style name get one build in table style.
            ITableStyle tableStyle = workbook.TableStyles["TableStyleMedium3"];
            //set built-in table style for table.
            table.TableStyle = tableStyle;
           //save to an excel file
   workbook.Save("ApplyTableStyle.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.CreateTable" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //add table.
            worksheet.Tables.Add(worksheet.Range["A1:F7"], true);          
           //save to an excel file
   workbook.Save("CreateTable.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.InsertDeleteTableRowColumns" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //add table.
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F7"], true);

            //add table column before first column.
            table.Columns.Add(0);
            //add table column before second column.
            table.Columns.Add(1);

            //delete first table column.
            table.Columns[0].Delete();
            //delete "City" table column.
            table.Columns["City"].Delete();

            //insert a table row in table's last row.
            table.Rows.Add();
            //delete second table row.
            table.Rows[1].Delete();            
           //save to an excel file
   workbook.Save("InsertDeleteTableRowColumns.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.PerformCalculationsInTable" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //add table.
            worksheet.Tables.Add(worksheet.Range["A1:F7"], true);

            //"Name" column's total row calculation function will be "=SUBTOTAL(103,[Name])"
            worksheet.Tables[0].Columns[0].TotalsCalculation = TotalsCalculation.Count;
            //"Weight" column's total row calculation function will be "=SUBTOTAL(101,[Weight])"
            worksheet.Tables[0].Columns[4].TotalsCalculation = TotalsCalculation.Average;
            worksheet.Tables[0].ShowTotals = true;
           //save to an excel file
   workbook.Save("PerformCalculationsInTable.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.RemoveTable" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

                object[,] data = new object[,]{
                    {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                    {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                    {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                    {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                    {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                    {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                    { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
                };

                IWorksheet worksheet = workbook.Worksheets[0];
                worksheet.Range["A1:F7"].Value = data;

                //add table.
                ITable table = worksheet.Tables.Add(worksheet.Range["A1:F7"], true);

                //remove table
                table.Delete();

               //save to an excel file
   workbook.Save("RemoveTable.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.TableFilter" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //add table.
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F7"], true);

            //Filter table 
            table.Range.AutoFilter(0, new object[] { "bob", "Betty" }, AutoFilterOperator.Values);
           //save to an excel file
   workbook.Save("TableFilter.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Tables.TableSort" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            object[,] data = new object[,]{
                {"Name", "City", "Birthday", "Sex", "Weight", "Height"},
                {"Bob", "NewYork", new DateTime(1968, 6, 8), "male", 80, 180},
                {"Betty", "NewYork", new DateTime(1972, 7, 3), "female", 72, 168},
                {"Gary", "NewYork", new DateTime(1964, 3, 2), "male", 71, 179},
                {"Hunk", "Washington", new DateTime(1972, 8, 8), "male", 80, 171},
                {"Cherry", "Washington", new DateTime(1986, 2, 2), "female", 58, 161},
                { "Eva", "Washington", new DateTime(1993, 2, 15), "female", 71, 180}
            };

            IWorksheet worksheet = workbook.Worksheets[0];
            worksheet.Range["A1:F7"].Value = data;
            worksheet.Range["A:F"].ColumnWidth = 15;

            //add table.
            ITable table = worksheet.Tables.Add(worksheet.Range["A1:F7"], true);

            //sort table 
            ValueSortField key1 = new ValueSortField(worksheet.Range["A1:A2"], SortOrder.Ascending);
            table.Sort.SortFields.Add(key1);
            table.Sort.Apply();
           //save to an excel file
   workbook.Save("TableSort.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Theme.AddCustomThemes" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            Themes themes = new Themes();

            //base theme is office theme when not give parameter.
            ITheme theme = themes.Add("testTheme");
            
            //Customize theme's color.
            theme.ThemeColorScheme[ThemeColor.Light1].RGB = Color.AntiqueWhite;
            theme.ThemeColorScheme[ThemeColor.Accent1].RGB = Color.AliceBlue;

            //Customize theme's font.
            theme.ThemeFontScheme.Major[FontLanguageIndex.Latin].Name = "Buxton Sketch";
            theme.ThemeFontScheme.Minor[FontLanguageIndex.Latin].Name = "Segoe UI";

            //Change workbook's theme to custom theme.
            workbook.Theme = theme;
           //save to an excel file
   workbook.Save("AddCustomThemes.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Theme.ChangeWorkbookTheme" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Change workbook's theme to built-in theme.
            workbook.Theme = Themes.Berlin;
           //save to an excel file
   workbook.Save("ChangeWorkbookTheme.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Workbook.CreateNewWorkbook" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Create empty workbook, contains one worksheet default.
            GrapeCity.Documents.Spread.Workbook workbookNew = new GrapeCity.Documents.Spread.Workbook();
           //save to an excel file
   workbook.Save("CreateNewWorkbook.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Workbook.ImportExcelFileToWorkbook" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //change the path to the real file path when open.
            workbook.Open(this.CurrentDirectory + "source.xlsx");
           //save to an excel file
   workbook.Save("ImportExcelFileToWorkbook.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Workbook.ImportExcelFileWithPassword" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //change the path to the real file path when open.
            workbook.Open(this.CurrentDirectory + "source.xlsx", "123456");
           //save to an excel file
   workbook.Save("ImportExcelFileWithPassword.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Workbook.SaveWorkbookToExcelFile" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //change the path to real export path when save.
            workbook.Save(this.CurrentDirectory + "dest.xlsx");
           //save to an excel file
   workbook.Save("SaveWorkbookToExcelFile.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Workbook.SaveWorkbookWithPassword" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //change the path to real export path when save.
            workbook.Save(this.CurrentDirectory + "dest.xlsx", "123456");
           //save to an excel file
   workbook.Save("SaveWorkbookWithPassword.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Workbook.ToJsonFromJson" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //ToJson&amp;FromJson can be used in combination with spread.sheets product:http://spread.grapecity.com/spreadjs/sheets/

            //spread.services import an excel file.
            //change the path to real source file path.
            string source = this.CurrentDirectory + "source.xlsx";
            workbook.Open(source);
            //spread.services export to a json string.
            var jsonstr = workbook.ToJson();
            //use the json string to initialize spread.sheets product.
            //spread.sheets will show the excel file contents.

            //spread.sheets product export a json string.
            //spread.services use the json string to initialize.
            workbook.FromJson(jsonstr);
            //spread.services export workbook to an excel file.
            //change the path to real export file path.
            string export = this.CurrentDirectory + "export.xlsx";
            workbook.Save(export);
           //save to an excel file
   workbook.Save("ToJsonFromJson.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Worksheets.AccessWorksheet" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Use sheet index to get worksheet.
            IWorksheet worksheet = workbook.Worksheets[0];

            //Use sheet name to get worksheet.
            IWorksheet worksheet1 = workbook.Worksheets["Sheet1"];
           //save to an excel file
   workbook.Save("AccessWorksheet.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Worksheets.ActivateWorksheet" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets.Add();
            //Activate new created worksheet.
            worksheet.Activate();
           //save to an excel file
   workbook.Save("ActivateWorksheet.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Worksheets.AddWorksheet" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            // Add a new worksheet to the workbook. The worksheet will be inserted into the end of the existing worksheet collection.
            workbook.Worksheets.Add();

            //Add a new worksheet to the specified position in the collection of worksheets.
            workbook.Worksheets.AddBefore(workbook.Worksheets[0]);
            workbook.Worksheets.AddAfter(workbook.Worksheets[1]);

            //Set worksheet's name.
            workbook.Worksheets[2].Name = "Product Plan";
           //save to an excel file
   workbook.Save("AddWorksheet.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Worksheets.ConfigWorksheet" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //worksheet sheet view settings.
            worksheet.SheetView.DisplayFormulas = false;
            worksheet.SheetView.DisplayRightToLeft = true;
            
            //Set worksheet tab color.
            worksheet.TabColor = Color.Green;

            //Set worksheet default row height.
            worksheet.StandardHeight = 20;
            //Set worksheet default column width.
            worksheet.StandardWidth = 50;

            IWorksheet worksheet1 = workbook.Worksheets.Add();
            //Hide worksheet.
            worksheet1.Visible = Visibility.Hidden;
           //save to an excel file
   workbook.Save("ConfigWorksheet.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Worksheets.DeleteWorksheet" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();
           
            IWorksheet worksheet = workbook.Worksheets.Add();

            //workbook must contain one visible worksheet at least, if delete the one visible worksheet, it will throw exception.
            worksheet.Delete();
           //save to an excel file
   workbook.Save("DeleteWorksheet.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Worksheets.ProtectWorksheet" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //protect worksheet, allow insert column.
            worksheet.Protection = true;
            worksheet.ProtectionSettings.AllowInsertingColumns = true;
           //save to an excel file
   workbook.Save("ProtectWorksheet.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Features.Worksheets.UnprotectWorksheet" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //protect worksheet, allow insert column.
            worksheet.Protection = true;
            worksheet.ProtectionSettings.AllowInsertingColumns = true;

            //Unprotect worksheet.
            worksheet.Protection = false;
           //save to an excel file
   workbook.Save("UnprotectWorksheet.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.SpreadSheetsViewer.HomeInventory" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file
            var fileStream = this.GetTemplateStream("Home inventory.xlsx");
            workbook.Open(fileStream);
           //save to an excel file
   workbook.Save("HomeInventory.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.SpreadSheetsViewer.ProjectCostTracker" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file
            var fileStream = this.GetTemplateStream("Project cost tracker.xlsx");
            workbook.Open(fileStream);
           //save to an excel file
   workbook.Save("ProjectCostTracker.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.SpreadSheetsViewer.SimplePersonalBudget" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file
            var fileStream = this.GetTemplateStream("Simple personal budget.xlsx");
            workbook.Open(fileStream);
           //save to an excel file
   workbook.Save("SimplePersonalBudget.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.SpreadSheetsViewer.StudentCalendar" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file
            var fileStream = this.GetTemplateStream("Student calendar (Mon).xlsx");
            workbook.Open(fileStream);
           //save to an excel file
   workbook.Save("StudentCalendar.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.SpreadSheetsViewer.TravelExpenseReport" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            //Load template file
            var fileStream = this.GetTemplateStream("Travel expense report.xlsx");
            workbook.Open(fileStream);
           //save to an excel file
   workbook.Save("TravelExpenseReport.xlsx");</value>
  </data>
  <data name="GrapeCity.Documents.Spread.Examples.Tutorial" xml:space="preserve">
    <value>   //create a new workbook
   var workbook = new GrapeCity.Documents.Spread.Workbook();

            IWorksheet worksheet = workbook.Worksheets[0];

            //-----------------------------Set Value------------------------------
            worksheet.Range["B3:C7"].Value = new object[,]
            {
                { "ITEM", "AMOUNT" },
                { "Income 1", 2500 },
                { "Income 2", 1000 },
                { "Income 3", 250 },
                { "Other", 250 },
            };
            worksheet.Range["B10:C23"].Value = new object[,]
            {
                { "ITEM", "AMOUNT" },
                { "Rent/mortgage", 800 },
                { "Electric", 120 },
                { "Gas", 50 },
                { "Cell phone", 45 },
                { "Groceries", 500 },
                { "Car payment", 273 },
                { "Auto expenses", 120 },
                { "Student loans", 50 },
                { "Credit cards", 100 },
                { "Auto Insurance", 78 },
                { "Personal care", 50 },
                { "Entertainment", 100 },
                { "Miscellaneous", 50 },
            };

            worksheet.Range["B2:C2"].Merge();
            worksheet.Range["B2"].Value = "MONTHLY INCOME";
            worksheet.Range["B9:C9"].Merge();
            worksheet.Range["B9"].Value = "MONTHLY EXPENSES";
            worksheet.Range["E2:G2"].Merge();
            worksheet.Range["E2"].Value = "PERCENTAGE OF INCOME SPENT";
            worksheet.Range["E5:G5"].Merge();
            worksheet.Range["E5"].Value = "SUMMARY";
            worksheet.Range["E3:F3"].Merge();
            worksheet.Range["E9"].Value = "BALANCE";
            worksheet.Range["E6"].Value = "Total Monthly Income";
            worksheet.Range["E7"].Value = "Total Monthly Expenses";


            //--------------------------------Set Height &amp; Width--------------------------------
            worksheet.StandardHeight = 26.25;
            worksheet.StandardWidth = 8.43;

            worksheet.Range["2:24"].RowHeight = 27;
            worksheet.Range["A:A"].ColumnWidth = 2.855;
            worksheet.Range["B:B"].ColumnWidth = 33.285;
            worksheet.Range["C:C"].ColumnWidth = 25.57;
            worksheet.Range["D:D"].ColumnWidth = 1;
            worksheet.Range["E:F"].ColumnWidth = 25.57;
            worksheet.Range["G:G"].ColumnWidth = 14.285;


            //------------------------------Set Table--------------------------------------
            ITable incomeTable = worksheet.Tables.Add(worksheet.Range["B3:C7"], true);
            incomeTable.Name = "tblIncome";
            incomeTable.TableStyle = workbook.TableStyles["TableStyleMedium4"];
            ITable expensesTable = worksheet.Tables.Add(worksheet.Range["B10:C23"], true);
            expensesTable.Name = "tblExpenses";
            expensesTable.TableStyle = workbook.TableStyles["TableStyleMedium4"];

            //------------------------------Set Formulas-----------------------------------
            worksheet.Names.Add("TotalMonthlyIncome", "=SUM(tblIncome[AMOUNT])");
            worksheet.Names.Add("TotalMonthlyExpenses", "=SUM(tblExpenses[AMOUNT])");
            worksheet.Range["E3"].Formula = "=TotalMonthlyExpenses";
            worksheet.Range["G3"].Formula = "=TotalMonthlyExpenses/TotalMonthlyIncome";
            worksheet.Range["G6"].Formula = "=TotalMonthlyIncome";
            worksheet.Range["G7"].Formula = "=TotalMonthlyExpenses";
            worksheet.Range["G9"].Formula = "=TotalMonthlyIncome-TotalMonthlyExpenses";

            //----------------------------Set Styles-------------------------
            IStyle currencyStyle = workbook.Styles["Currency"];
            currencyStyle.IncludeAlignment = true;
            currencyStyle.HorizontalAlignment = HorizontalAlignment.Left;
            currencyStyle.VerticalAlignment = VerticalAlignment.Bottom;
            currencyStyle.NumberFormat = "$#,##0.00";

            IStyle heading1Style = workbook.Styles["Heading 1"];
            heading1Style.IncludeAlignment = true;
            heading1Style.HorizontalAlignment = HorizontalAlignment.Center;
            heading1Style.VerticalAlignment = VerticalAlignment.Center;
            heading1Style.Font.Name = "Century Gothic";
            heading1Style.Font.Bold = true;
            heading1Style.Font.Size = 11;
            heading1Style.Font.Color = Color.White;
            heading1Style.IncludeBorder = false;
            heading1Style.IncludePatterns = true;
            heading1Style.Interior.Color = Color.FromRGB(32, 61, 64);

            IStyle percentStyle = workbook.Styles["Percent"];
            percentStyle.IncludeAlignment = true;
            percentStyle.HorizontalAlignment = HorizontalAlignment.Center;
            percentStyle.IncludeFont = true;
            percentStyle.Font.Color = Color.FromRGB(32, 61, 64);
            percentStyle.Font.Name = "Century Gothic";
            percentStyle.Font.Bold = true;
            percentStyle.Font.Size = 14;

            worksheet.SheetView.DisplayGridlines = false;
            worksheet.Range["C4:C7, C11:C23, G6:G7, G9"].Style = currencyStyle;
            worksheet.Range["B2, B9, E2, E5"].Style = heading1Style;
            worksheet.Range["G3"].Style = percentStyle;

            worksheet.Range["E6:G6"].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Medium;
            worksheet.Range["E6:G6"].Borders[BordersIndex.EdgeBottom].Color = Color.FromRGB(32, 61, 64);
            worksheet.Range["E7:G7"].Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Medium;
            worksheet.Range["E7:G7"].Borders[BordersIndex.EdgeBottom].Color = Color.FromRGB(32, 61, 64);

            worksheet.Range["E9:G9"].Interior.Color = Color.FromRGB(32, 61, 64);
            worksheet.Range["E9:G9"].HorizontalAlignment = HorizontalAlignment.Left;
            worksheet.Range["E9:G9"].VerticalAlignment = VerticalAlignment.Center;
            worksheet.Range["E9:G9"].Font.Name = "Century Gothic";
            worksheet.Range["E9:G9"].Font.Bold = true;
            worksheet.Range["E9:G9"].Font.Size = 11;
            worksheet.Range["E9:G9"].Font.Color = Color.White;
            worksheet.Range["E3:F3"].Borders.Color = Color.FromRGB(32, 61, 64);

            //----------------------------Set Conditional Format-------------------------
            IDataBar dataBar = worksheet.Range["E3"].FormatConditions.AddDatabar();
            dataBar.MinPoint.Type = ConditionValueTypes.Number;
            dataBar.MinPoint.Value = 1;
            dataBar.MaxPoint.Type = ConditionValueTypes.Number;
            dataBar.MaxPoint.Value = "=TotalMonthlyIncome";
            dataBar.BarFillType = DataBarFillType.Gradient;
            dataBar.BarColor.Color = Color.Red;
            dataBar.ShowValue = false;
            
            //--------------------------------Set Shape--------------------------------
            IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 339, 247, 316.5, 346);
            shape.Chart.ChartArea.Format.Line.Transparency = 1;
            shape.Chart.ColumnGroups[0].Overlap = 0;
            shape.Chart.ColumnGroups[0].GapWidth = 37;

            IAxis category_axis = shape.Chart.Axes.Item(AxisType.Category);
            category_axis.Format.Line.Color.RGB = Color.Black;
            category_axis.TickLabels.Font.Size = 11;
            category_axis.TickLabels.Font.Color.RGB = Color.Black;

            IAxis series_axis = shape.Chart.Axes.Item(AxisType.Value);
            series_axis.Format.Line.Weight = 1;
            series_axis.Format.Line.Color.RGB = Color.Black;
            series_axis.TickLabels.NumberFormat = "$###0";
            series_axis.TickLabels.Font.Size = 11;
            series_axis.TickLabels.Font.Color.RGB = Color.Black;

            ISeries chartSeries = shape.Chart.SeriesCollection.NewSeries();
            chartSeries.Formula = "=SERIES(\"Simple Budget\",{\"Income\",\"Expenses\"},'Sheet1'!$G$6:$G$7,1)";
            chartSeries.Points[0].Format.Fill.Color.RGB = Color.FromRGB(176, 21, 19);
            chartSeries.Points[1].Format.Fill.Color.RGB = Color.FromRGB(234, 99, 18);
            chartSeries.DataLabels.Font.Size = 11;
            chartSeries.DataLabels.Font.Color.RGB = Color.Black;
            chartSeries.DataLabels.ShowValue = true;
            chartSeries.DataLabels.Position = DataLabelPosition.OutsideEnd;
           //save to an excel file
   workbook.Save("Tutorial.xlsx");</value>
  </data>
</root>