Asked  7 Months ago    Answers:  5   Viewed   39 times

Is there any other PHP components like PHPExcel?



There is some class that generates PHP Excel files (real excel files, not that .csv thing). I use (DEPRICATED) See edit 2:

BUT: I have had a problem when trying to read these generated excel files with the java excel READER, so there might be bugs in this PHP script.

  1. EDIT: Nice one:

  2. PhpSpreadsheet is the next version of PHPExcel. It breaks compatibility to dramatically improve the code base quality (namespaces, PSR compliance, use of latest PHP language features, etc.).

Wednesday, March 31, 2021
answered 7 Months ago

Definition of which is the best is very subjective... I have a vested interest when I say that PHPExcel is the best, because I'm the main developer. However:

  • very few of the packages listed in this thread are still actively supported
  • work only with one or other format of Excel files (BIFF .xls or Office Open XML .xlsx)
  • can only read, or only write
  • or require third-party plug-ins, or specific operating platforms

Best is a very subjective term, and it really depends on your exact requirements including

  • whether you are able to use (for example) COM to interact directly with MS Excel on the server
  • or need to both read and write Excel
  • or need to work with xls, or xlsx or both formats
  • or care about ongoing development/support
Wednesday, March 31, 2021
answered 7 Months ago

Do you mean like Kohana 2.x's flash session variables?

The latest Kohana supports get_once() which is pretty similar to the old flash session variables.

$session = Session::instance();

$session->set('test', 'Hello, World!');

// The session variable is returned and removed.
$test = $session->get_once('test');
Saturday, May 29, 2021
answered 5 Months ago

Found the solution,

  1. In controller add distinct as an array parameter with other pagination options. So if I was trying to retrieve a list of Cars in my inventory with 10 cars at a time, the options would have a DISTINCT clause in the fields parameter and a separate parameter called distinct would also be added as shown below

    $options = array( 'conditions' => $conditions, 'joins' => $joins, 'limit' => 10, 'fields' => array( 'DISTINCT', 'title', 'user_id'), 'contain' => array( 'Dealer' => array('id'), ), 'paramType' => 'querystring', 'distinct' => '' );

    $this->Paginator->settings = $options; $cars = $this->Paginator->paginate('Car');

  2. In Model, use the below function to override the original paginateCount method

    public function paginateCount($conditions = null, $recursive = 0, $extra = array()) { $parameters = compact('conditions', 'recursive'); if (isset($extra['distinct'])) { $parameters['fields'] = 'DISTINCT ' . $extra['distinct']; $count = $this->find('count', array_merge($parameters, $extra)); } else { // regular pagination $count = $this->find('count', array_merge($parameters, $extra)); } return $count; }

  3. No change in View

Saturday, May 29, 2021
answered 5 Months ago

The model declaration in $this->Form->create() should not be plural:

<?php echo $this->Form->create('Post', array('action'=>'add')); ?>

It that doesn't solve the missing controller error, please update your original question with the contents of the error message (which controller is missing, for example).

Saturday, May 29, 2021
answered 5 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :