0

How will convert array to excel using PHPexcell. Its a mixed array few values are hyperlink few are dates and string. Thanks in advance. For below array using setCellValue and getHyperlink()->setUrl works fine But i want directly from array($array) to exce $array = array( 0 => array('product_name' => 'mobile', 'description' => 'Mobile Details', 'add_date' => '10-12-2015', 'details_link' => array('lable' => 'details_link', 'link' => 'www.example.com/mobiledetails.php')), 1 => array('product_name' => 'Computer', 'description' => 'Computer Details', 'add_date' => '10-01-2015', 'details_link' => array('lable' => 'details_link', 'link' => 'www.example.com/computerdetails.php')));

2
  • where is your code? Commented Aug 11, 2016 at 7:53
  • Post some code what you tried so far. Commented Aug 11, 2016 at 7:53

1 Answer 1

1

Use PHPExcel's fromArray() method, with the Advanced Value Binder; that should cover most variations, although you may need to extend the Advanced Value Binder with a custom binder to handle hyperlinks.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.