Hi,
I am filling excel sheet cells with the column names. Suppose if i want to insert data in "A1" cell , I am getting the ASC value of an integer(65) and concatinating the row value to the result and inserting the value in that cell.
Dim i as integer
Dim Num as integer=65
Dim chr As String
with excel.worksheet
For i = 1 To count
chr = System.Convert.ToChar(Num)
.Range(chr & "1").Value = i
Next
So the value are filling from A1.....Z1. But after Z1, the cell name starts with AA, AB, AC.......AZ, BA,BB......BZ, CA,CB,..........CZ.
Then i made a string like "AA" and try to insert the data in to that.
But its giving error. How to insert the data in to "AA" dynamically.
I will be greateful to you if any one suggested me in this regard.
Thanks,
To get the column name dynamically i am using ToChar() function ASC char for an integer.
I am filling excel sheet cells with the column names. Suppose if i want to insert data in "A1" cell , I am getting the ASC value of an integer(65) and concatinating the row value to the result and inserting the value in that cell.
Dim i as integer
Dim Num as integer=65
Dim chr As String
with excel.worksheet
For i = 1 To count
chr = System.Convert.ToChar(Num)
.Range(chr & "1").Value = i
Next
So the value are filling from A1.....Z1. But after Z1, the cell name starts with AA, AB, AC.......AZ, BA,BB......BZ, CA,CB,..........CZ.
Then i made a string like "AA" and try to insert the data in to that.
But its giving error. How to insert the data in to "AA" dynamically.
I will be greateful to you if any one suggested me in this regard.
Thanks,
To get the column name dynamically i am using ToChar() function ASC char for an integer.