Aspose.Cells.Examples.CSharp.Formulas.CalculatingFormulasOnce.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:1
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

          

            // Load the template workbook
            Workbook workbook = new Workbook(dataDir + "book1.xls");

            // Print the time before formula calculation
            Console.WriteLine(DateTime.Now);

            // Set the CreateCalcChain as false
            workbook.Settings.CreateCalcChain = false;

            // Calculate the workbook formulas
            workbook.CalculateFormula();

            // Print the time after formula calculation
            Console.WriteLine(DateTime.Now);
            // ExEnd:1

        }
    }
CalculatingFormulasOnce