Migrating DataValidation from 4 to 5

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
leek
Posts: 1
Joined: Mon Jun 24, 2013 1:48 pm

Migrating DataValidation from 4 to 5

Post by leek »

Hello;

I'm having trouble to upgrade an existing validation code written in Delphi 7:

1. TXlsDataValidation in unit XlsValidate5 does not have SetList method.
2. TDataValidation in unit BIFF_Validate5 does but cannot be added using ws.Validations.Add.
3. What is the purpose of the 3 types of source files starting with BIFF, XC12, XLS, and XPGP?
4. Is there any documentation describing this components?

Thank you for your help!

var
ws: TXLSWorksheet;
dv: TXlsDataValidation; //used to be TDataValidation which still have needed SetList method;
begin
dv := ws.Validations.Add;
dv.Areas.Add(0, cDataRowID + 1, 0, LastRow);
dv.ValidationType := x12dvtList;
dv.ValidationOperator := x12dvoBetween;
dv.ValidationStyle := x12dvesStop;
dv.SetList(['u', 'update', 'a', 'add', 'insert']);
dv.ErrorTitle := 'Invalid Action';
dv.ErrorMsg := 'Only values from the list can be used!';
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Migrating DataValidation from 4 to 5

Post by larsa »

Hello

1,2 Issues regarding Data Validation will be addressed in a later uodate.
3. Create the component. It would take to long time to give a detailed answer on that.
4 There is a thml help that gives the component hierarchy.
Lars Arvidsson, Axolot Data
mwhiting
Posts: 17
Joined: Tue Dec 23, 2014 4:32 am

Re: Migrating DataValidation from 4 to 5

Post by mwhiting »

See viewtopic.php?f=16&t=2330&p=5683&sid=9e ... 0a8a#p5683. I posted code that will work for the Data Validations
(I'm using 50.20.41)
Post Reply