Jump to content
Henry Olive

Getting Excel Column Value

Recommended Posts

Good Day, Night

.....

ItemNoCol := Ord(ComboBox2.Text[1]) - Ord('A') + 1; 

QtyCol    := Ord(ComboBox3.Text[1]) - Ord('A') + 1;

DataStart := StrToInt(ComboBox4.Text); // Which column does data start in

 

for Row := DataStart to ExcelRowsCount do
begin
  ItemNo :=Trim(Sheet.Cells[Row, ItemNoCol]);
  if (ItemNo <>'') then
  if (Sheet.Cells [Row, QtyCol] <> '0') or (Sheet.Cells [Row, QtyCol] <> '') then  // HERE i get invalid variant operation err.msg
    begin

....

end;

 

What am i doing wrong ?

 

Thank You

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×