Board index » delphi » Excel: lcid /"subrange bounds"warning/ range

Excel: lcid /"subrange bounds"warning/ range

1) what is the parameter lcid? in Excel's help it doesn't exists, it seems
to be an agregatte in delphi.

2) I get an "Constant expresion violates subrange bounds" in the lines:
     excelApplication.workBooks.add (xlWBATWorksheet,1);
              and
    ExcelWorkBook.WorkSheets.Add (EmptyParam, EmptyParam,1,xlWorkSheet,1);
    is it important? Am I doing something wrong?

3) I would like to use Range in a better way than range ['A1','C5'], and I
read in the vb for excel help that ....range [...cells [1,1],...cells [3,5]]
should work, but cells doesn't have a default property, so I get a compiler
error.
   How can I do it?

 

Re:Excel: lcid /"subrange bounds"warning/ range


<<Alejandro Marcu:
 1) what is the parameter lcid? in Excel's help it doesn't exists, it
seems to be an agregatte in delphi.

Quote

It's a locale identifier that has to be supplied when
you're using early binding. You can use GetUserDefaultLCID
to get the value.

<<Alejandro:
 2) I get an "Constant expresion violates subrange bounds"
<snip>
is it important? Am I doing something wrong?

Quote

No, and no. :)

<<Alejandro:
3) cells doesn't have a default property, so I get a compiler
error. How can I do it?

Quote

Cells.Item[1,1]

Deborah Pate

Other Threads