This is a migrated thread and some comments may be shown as answers.

Issue with NameConverter.ConvertRowNameToIndex(cell)

4 Answers 41 Views
SpreadProcessing
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 19 Dec 2018, 05:36 PM

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

 

 


4 Answers, 1 is accepted

Sort by
0
Accepted
Peshito
Telerik team
answered on 24 Dec 2018, 07:17 AM
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.
0
Luis
Top achievements
Rank 1
answered on 07 Feb 2019, 11:08 PM

Hi Peshito,

thanks for the answer, it´s works!

 

0
Luis
Top achievements
Rank 1
answered on 08 Mar 2019, 06:06 PM

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.

 

 

 

 

0
Nikolay Demirev
Telerik team
answered on 13 Mar 2019, 06:14 AM
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.
Tags
SpreadProcessing
Asked by
Luis
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Luis
Top achievements
Rank 1
Nikolay Demirev
Telerik team
Share this question
or