Page 1 of 1

AsVariant and null hangs on error

Posted: Thu Jun 19, 2014 5:46 pm
by zvasku
Hello,

If I set null to AsVariant(col,row), application raises exception and excel file is corrupted. AsVariant function should handle null state properly.

Thanks
Zdenek

Re: AsVariant and null hangs on error

Posted: Fri Jun 20, 2014 8:42 am
by larsa
Hello

The component is handling it properly. You get an exception. You can't assign a null value to a cell.

Re: AsVariant and null hangs on error

Posted: Fri Jun 20, 2014 11:59 am
by zvasku
I think it's not good behaviour. If I set Null to cell using AsVariant, cell should be cleared. Thats's why we use variants with nulls.

This should work directly like this:

XLS[].AsVariant[]:=Dataset.Fields[].AsVariant

Re: AsVariant and null hangs on error

Posted: Sat Jun 21, 2014 11:31 am
by larsa
Hello

AsVariant has worked this way since it was introduced several years ago, It's expected to work this way.