<commit_before>using System.IO;

using Aspose.Cells;
using System;
using System.Collections;

namespace Aspose.Cells.Examples.Articles
{
    public class AddingAnonymousCustomObject
    {
        public static void Main(string[] args)
        {
            // The path to the documents directory.
            string dataDir = Aspose.Cells.Examples.Utils.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

           // Create directory if it is not already present.
            bool IsExists = System.IO.Directory.Exists(dataDir);
            if (!IsExists)
                System.IO.Directory.CreateDirectory(dataDir);

        //Open a designer workbook
WorkbookDesigner designer = new WorkbookDesigner();

//get worksheet Cells collection
Cells cells = designer.Workbook.Worksheets[0].Cells;

//Set Cell Values
cells["A1"].PutValue("Name");
cells["B1"].PutValue("Age");

//Set markers
cells["A2"].PutValue("&=Person.Name");
cells["B2"].PutValue("&=Person.Age");

//Create Array list
ArrayList list = new ArrayList();

//add custom objects to the list
list.Add(new Person("Simon", 30));
list.Add(new Person("Johnson", 33));

//add designer's datasource
designer.SetDataSource("Person", list);

//process designer
designer.Process(false);

//save the resultant file
designer.Workbook.Save(dataDir+ "result.out.xls");
    }
            
            
        }
    }

public class Person
{
    public String Name;
    public int Age;
    internal Person(string name,int age)
    {
        this.Name = name;
        this.Age = age;
    }
}<commit_msg>Update AddingAnonymousCustomObject.cs<commit_after>using System.IO;

using Aspose.Cells;
using System;
using System.Collections;

namespace Aspose.Cells.Examples.Articles
{
    //ExStart:1
    public class AddingAnonymousCustomObject
    {
        public static void Main(string[] args)
        {
            // The path to the documents directory.
            string dataDir = Aspose.Cells.Examples.Utils.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

           // Create directory if it is not already present.
            bool IsExists = System.IO.Directory.Exists(dataDir);
            if (!IsExists)
                System.IO.Directory.CreateDirectory(dataDir);

        //Open a designer workbook
WorkbookDesigner designer = new WorkbookDesigner();

//get worksheet Cells collection
Cells cells = designer.Workbook.Worksheets[0].Cells;

//Set Cell Values
cells["A1"].PutValue("Name");
cells["B1"].PutValue("Age");

//Set markers
cells["A2"].PutValue("&=Person.Name");
cells["B2"].PutValue("&=Person.Age");

//Create Array list
ArrayList list = new ArrayList();

//add custom objects to the list
list.Add(new Person("Simon", 30));
list.Add(new Person("Johnson", 33));

//add designer's datasource
designer.SetDataSource("Person", list);

//process designer
designer.Process(false);

//save the resultant file
designer.Workbook.Save(dataDir+ "result.out.xls");
    }
            
            
        }
    }

public class Person
{
    public String Name;
    public int Age;
    internal Person(string name,int age)
    {
        this.Name = name;
        this.Age = age;
    }
}
//ExEnd:1
{'fraction_non_alphanumeric': 0.12288930581613508, 'fraction_numerical': 0.006253908692933083, 'mean_word_length': 2.993757802746567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3745922', 'n_tokens_mistral': 976, 'n_tokens_neox': 902, 'n_words': 233}