Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IExtendedFormat Interface : IsFirstSymbolApostrophe Property

IsFirstSymbolApostrophe Property

If true then first symbol in cell is apostrophe.
Syntax
'Declaration
 
Property IsFirstSymbolApostrophe As Boolean
'Usage
 
Dim instance As IExtendedFormat
Dim value As Boolean
 
instance.IsFirstSymbolApostrophe = value
 
value = instance.IsFirstSymbolApostrophe
bool IsFirstSymbolApostrophe {get; set;}
Example
The following code illustrates how to access IsFirstSymbolApostrophe property of a IStyle.
using Syncfusion.XlsIO;
using System;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add style
            IStyle style = workbook.Styles.Add("CustomStyle");
            
            //Set style
            worksheet["C2"].CellStyle = style;
            
            //Set text
            worksheet["C2"].Text = @"'12345";
            
            //Access extended format
            IExtendedFormat format = worksheet["E2"].CellStyle;
            
            //Set text
            worksheet["E2"].Text = @"'12345";
            
            //Save
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
            
            //Open worksheet
            IWorkbook book = application.Workbooks.Open("CellFormats.xls");
            IWorksheet sheet = book.Worksheets[0];
            
            //Get style
            IStyle customStyle = sheet["C2"].CellStyle;
            
            //Get extended format
            IExtendedFormat extendedFormat = sheet["E2"].CellStyle;
            
            //Check first symbol is apostrophe or not
            Console.Write(customStyle.IsFirstSymbolApostrophe);
            Console.Write(extendedFormat.IsFirstSymbolApostrophe);
            
            //Save and dispose
            book.SaveAs("CellFormats.xlsx");
            book.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//True
//True
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also