Validations not working with xvExcel97

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
CarstenG
Posts: 3
Joined: Tue Dec 01, 2009 3:52 pm

Validations not working with xvExcel97

Post 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;
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Validations not working with xvExcel97

Post 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.
Lars Arvidsson, Axolot Data
Post Reply