Issue with NameConverter.ConvertRowNameToIndex(cell)

2 posts, 0 answers
  1. Luis
    Luis avatar
    1 posts
    Member since:
    Dec 2018

    Posted 19 Dec 2018 Link to this post

    Hi, im trying to convert a string value("C5") to row, debugging get the error 

    -NameConverter.ConvertColumnNameToIndex(cell)'NameConverter.ConvertColumnNameToIndex(cell)' threw an exception of type 'Telerik.Windows.Documents.Spreadsheet.Utilities.LocalizableException'int {Telerik.Windows.Documents.Spreadsheet.Utilities.LocalizableException}
    +Data{System.Collections.ListDictionaryInternal}System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
    +FormatStringArguments{string[1]}string[]
    HResult-2146233088int
    HelpLinknullstring
    +InnerException{"'C5' is invalid column name."}System.Exception {System.InvalidOperationException}
    LocalizationKey"Spreadsheet_ErrorExpressions_InvalidColumnName"string
    Message"'C5' is invalid column name."string
    Source"Telerik.Windows.Documents.Spreadsheet"string
    StackTrace"   at Telerik.Windows.Documents.Spreadsheet.Utilities.NameConverter.ConvertColumnNameToIndex(String columnName)"string
    +TargetSite{Int32 ConvertColumnNameToIndex(System.String)}System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
    +Static members
    +Non-Public members

     

     


  2. Peshito
    Admin
    Peshito avatar
    554 posts

    Posted 24 Dec 2018 Link to this post

    Hi Luis,

    This exception is caused by the fact that "C5"  is not a valid column name. The name of the column you are trying to convert is "C". In order to convert the column name to the appropriate index which in this case would be 2, pass "C" as parameter value in the ConvertColumnNameToIndex() method.

    Regards,
    Peshito
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top