SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PEAR: Spreadsheet_Excel_Writer_Validation

    I have recently installed PEAR and the Spreadsheet_Excel_Writer package,
    and have found it to be simple to use - excellent.

    I have used it to create a spreadsheet from a website and have included
    quite a bit of formatting and a number of Excel functions.

    I need to add a number of drop down lists on the spreadsheet (Validation
    against a list), and do not know how to use the
    Spreadsheet_Excel_Writer_Validation class that comes with the package.

    Is there some documentation on how to use this class, or is there a way
    to do it without using this class?

    Thank you in anticipation.

  2. #2
    SitePoint Evangelist
    Join Date
    Mar 2003
    Location
    Melbourne, Australia
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i know it's a port of a perl module, so perhaps you can have a look there
    otherwise, i'd just read the source code, and pear documentation, and do some experimenting to see how it works

    hth
    dave

  3. #3
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, Dave, the source code (Validator.php) seems to be incomplete. The class Spreadsheet_Excel_Writer_Validator contains a comment "// FIXME: add method for setting datatype" and the other class Spreadsheet_Excel_Writer_Validation_List has been commented out completely and looks incomplete.

    There is no documentation for the _Validator class.

    The source code also has stuff I don't understand, e.g. $this->_title_prompt = "\x00"; and $data .= pack("vC", $title_prompt_len, 0x00) . $this->_title_prompt;

    This probably because I'm not so good with coding in Excel. Any pointers?

    With thanks

    Peter


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •