Link to home
Start Free TrialLog in
Avatar of wzm
wzm

asked on

LotusScript - Excel Range

Hi,

Error:"Object not found ..."
Reasons:When excel column reach "AB" chr(i) no longer working
Question:Any workaround/fix ?

i=97
For x = Lbound(ArrName) To Ubound(ArrName)
 i = i + 1            
 ctr = ctr + 1                  
 xlSheet.Range(Trim(Chr(i)) & Cstr(ctr)).Value = ArrName(x)
..


Avatar of olaraak
olaraak
Flag of Estonia image

Alphabet:
A=Chr(65)...Z=Chr(90)

How you want to fill your sheet?
Usually it is filled by column like this:

rem  if we use only column A, 
rem  then i=65
rem  file = excel file object
 
rownumber = 1
 
For x = Lbound(ArrName) To Ubound(ArrName) 
  
   cellname$ = chr(i) & cstr(rownumber)
   file.range( cellname$ ).Select
   file.Activecell.FormulaR1C1 = ArrName(x)
   rownumber = rownumber + 1
 
End For
 
rem If you need to change column, then substitute needed number for i

Open in new window

Avatar of wzm
wzm

ASKER

abt 250 columns (depends of array) with at least 10 rows each.
Then add column loop and row loop.

Or, swap columns and rows, if its possible.

Avatar of wzm

ASKER

chr(i) is from A to Z, but when it reach colums AA,AB... that caused the problem
ASKER CERTIFIED SOLUTION
Avatar of olaraak
olaraak
Flag of Estonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial