Aspose.Cells.Examples.CSharp.Articles.AddingCustomPropertiesVisible.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:1
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            // Create workbook object
            Workbook workbook = new Workbook(FileFormatType.Xlsx);

            // Add simple property without any type
            workbook.ContentTypeProperties.Add("MK31", "Simple Data");

            // Add date time property with type
            workbook.ContentTypeProperties.Add("MK32", "04-Mar-2015", "DateTime");

            // Save the workbook
            workbook.Save(dataDir + "AddingCustomPropertiesVisible_out.xlsx");
            // ExEnd:1            
        }
    }
AddingCustomPropertiesVisible