Page 1 of 1

Validations not working with xvExcel97

Posted: Wed Apr 15, 2015 3:22 pm
by CarstenG
For compatibility-reasons, our application has to support xvExcel97 as well as xvExcel2007.

With xvExcel2007, validations are working properly (as far as i have tested it).
But when i try to write validations into or read validations from an xvExcel97-file using 5.20.13, the result is empty (XLS[0].validations.count = 0).
To verify this issue, simply prepare an Excel-file with a validation and then do the test as follows:

Code: Select all

procedure TForm1.btnReadClick(Sender: TObject);
begin
  FExcel.Filename := 'MyTest.xls';
  FExcel.Read;

  If (FExcel[0].Validations.Count > 0) then
    ShowMessage('Success: ' + IntToStr(FExcel[0].Validations.Count))
  else
    ShowMessage('Bad: ' + IntToStr(FExcel[0].Validations.Count));
end;

Re: Validations not working with xvExcel97

Posted: Thu Apr 16, 2015 6:44 am
by larsa
Hello

Validations in Excel 97 files are in the XLS.BIFF.Sheet[0].Validations property. Keeping validations in a common object is on the todo list. Hope to have this ready soon.