Issue with NameConverter.ConvertRowNameToIndex(cell)

5 posts, 1 answers
  1. Luis
    Luis avatar
    11 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. Answer
    Peshito
    Admin
    Peshito avatar
    559 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.
  3. Luis
    Luis avatar
    11 posts
    Member since:
    Dec 2018

    Posted 07 Feb in reply to Peshito Link to this post

    Hi Peshito,

    thanks for the answer, it´s works!

     

  4. Luis
    Luis avatar
    11 posts
    Member since:
    Dec 2018

    Posted 08 Mar Link to this post

    Hi, after of reviewing of end users, they comment about the opcion copy/paste of cells, when select the cells that we want copy in others cells, appear a pop up that say: "Cannot change part of a merged cell." How I can apply this functionality (copy/paste) without this error.

     

     

     

     

  5. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    155 posts

    Posted 13 Mar Link to this post

    Hello Luis,

    The reason for the error is that you are trying to paste in cells which contains merged cells which is not supported by the RadSpreadProcessing. You can handle this by preserving the merged cells part of the target cell range before paste, unmerge them, and after paste, you could merge them again. There might be conflicts if you are trying to paste another merged cells, but it will be up to you to resolve the conflicts.

    This article explains in details how to merged and unmerge cells.

    I hope this works for you.

    Regards,
    Nikolay Demirev
    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