Syncfusion.XlsIO.Base
Example 


IsListInFormula Property

True if formula contains list of values. otherwise False.
Syntax
'Declaration
 
Property IsListInFormula As Boolean
'Usage
 
Dim instance As IDataValidation
Dim value As Boolean
 
instance.IsListInFormula = value
 
value = instance.IsListInFormula
bool IsListInFormula {get; set;}
Remarks
Default value for IsListInFormula is false. Mostly the IsListInFormula property used for internal purpose. To know more about IsListInFormula property refer this link.
Example
The following code illustrates the use of IsListInFormula property.
using Syncfusion.XlsIO;
using System.Drawing;
            
class Example
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
           //Create a worksheet.        
           IApplication application = excelEngine.Excel;
           application.DefaultVersion = ExcelVersion.Excel2013;
           IWorkbook workbook = application.Workbooks.Create(1);
           IWorksheet worksheet = workbook.Worksheets[0];
           worksheet.Range["C3"].CellStyle.Color = Color.LightGray;
           worksheet.Range["C1"].Text = "Data Validation List in C3";
           worksheet.Range["C1"].AutofitColumns();
            
           // DataValidation in Worksheet Range
           IDataValidation dataValidation = worksheet.Range["C3"].DataValidation;
           dataValidation.ListOfValues = new string[] { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" };
           
           //True if dataValiadation's ListOfValues property has a value       
           if(dataValidation.IsListInFormula) 
           {
              //Your code here
           }
           workbook.SaveAs("DataValidation.xlsx");
           workbook.Close();
           excelEngine.Dispose();
        }
     }
 }
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also