How to find the length of an Excel cell

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nudrat
    New Member
    • Aug 2007
    • 38

    How to find the length of an Excel cell

    Hi All,
    In my application I am reading an excel sheet with the help of excel class. I have to find out no. of characters entered in a particular cell.
    please find the solution for that.

    Thanks & Regards
    Nudrat
  • Question123
    New Member
    • Feb 2008
    • 41

    #2
    Hi

    Use this line of code to get count of character per cell

    string sCellString = ((Excel.Range)x lWSheet.Cells[iRow, iCol]).Text.ToString ();

    Int32 iCharCount = sCellString.Len gth
    Last edited by Question123; Jun 4 '08, 01:28 PM. Reason: Variable change

    Comment

    Working...