PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Using Validator

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats
View previous topic :: View next topic  
Author Message
Babe Ruth



Joined: 18 Apr 2008
Posts: 6

PostPosted: Thu Jun 05, 2008 11:23 am    Post subject: Using Validator Reply with quote

I am trying to make a date format validation in which the a value of the cell must be in (mm/dd/yyyy). If a cell will be typed for example (abcdeef), it will not be printed in the cell. There will prompt a message that it is not the correct format.

I used this code


$row_count = 7;

$valformula =& $workbook->addValidator();
$valformula->allowBlank('true');
$valformula->setFormula1('(CONCATENATE(MID($row_count,1,2),"/",MID($row_count,4,2),"/",MID($row_count,7,4)))');
$valformula->setError('Invalid Date Format','Please fill correct format (mm/dd/yyyy)','true');

$worksheet->setValidation($row_count,1,$row_count,1,$valformula);

There is an operation time-out when I run it. How will I used the Spreadsheet_Excel_Writer_Validator. How will I use correctly the fomula for validation. I cannot see any documentation or samples regarding the usage of Validator
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software