dakota / cakeexcel Goto Github PK
View Code? Open in Web Editor NEWA plugin to generate Excel files with CakePHP. Uses the PHPExcel library.
License: MIT License
A plugin to generate Excel files with CakePHP. Uses the PHPExcel library.
License: MIT License
Is there any way that you can update the README with a brief description of how you're using this?
Hi is this plugin working? I noticed it says build failing in 3.0 Branch and the PHPExcel link it says build failing as well. And is this PHPExcel that your using the same as this one?
https://phpexcel.codeplex.com/
I am having trouble getting some kind of hello world to start
I did the composer
//bootstrap.php
Plugin::load('Dakota/CakeExcel', ['bootstrap' => true, 'routes' => true]);
//appcontroller.php - in initialize()
$this->loadComponent('RequestHandler',[
'viewClassMap' => [ 'xlsx' => 'CakeExcel.Excel' ]
]
);
//created a link, Template/Products/index.ctp
this->Html->link('Excel file', array('ext' => 'xlsx'));
//in my Template/Products/xlsx/index.ctp
PhpExcel; $spreadsheet->setActiveSheetIndex(0); $worksheet = $spreadsheet->getActiveSheet(); $worksheet->SetCellValueByColumnAndRow(0, 1, 'Hello World'); $writer = new PHPExcel_Writer_Excel2007($spreadsheet); $writer->save('hello-world.xlsx'); ?>//how do i get the php writer? How does it know to open index.ctp in that folder?
label:question
Configured the pull request version of this(with changes for the 3.1 version of CakePHP, as the 3.0 doesnt work anymore due to changes in the viewClassMap at the RequestHandler configuration), but it doesn't work when I call the $this->PhpExcel on the view with the error "Helper class PhpExcelHelper could not be found".
Sample code taken from web, at index.ctp:
PhpExcel; $spreadsheet->setActiveSheetIndex(0); $worksheet = $spreadsheet->getActiveSheet(); $worksheet->SetCellValueByColumnAndRow(0, 1, 'Hello World'); $writer = new PHPExcel_Writer_Excel2007($spreadsheet); $writer->save('hello-world.xlsx'); ?>Shell output:
composer require dakota/cake-excel 3.1.x-dev
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package dakota/cake-excel could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
If I use composer show dakota/cake-excel
:
name : dakota/cake-excel
descrip. : CakePHP excel generator
keywords : PHPExcel, cakephp, dakota, excel
versions : * v1.0.1
type : cakephp-plugin
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source : [git] https://github.com/dakota/CakeExcel.git 70ded98cb97038a6c41a8e19c4cbb06838cd5897
dist : [zip] https://api.github.com/repos/dakota/CakeExcel/zipball/70ded98cb97038a6c41a8e19c4cbb06838cd5897 70ded98cb97038a6c41a8e19c4cbb06838cd5897
names : dakota/cake-excel
requires
composer/installers *
php >=5.2.0
phpexcel/phpexcel ~1.7.0
Plugin::load('Dakota\CakeExcel', ['bootstrap' => true, 'routes' => true]);
$this->PhpExcel did not available/accessible on the view
Hi,
I followed the instructions in the README but I can't load the plugin.
My composer.json:
{
"name": "cakephp/app",
"description": "CakePHP skeleton app",
"homepage": "http://cakephp.org",
"type": "project",
"license": "MIT",
"require": {
"php": ">=5.4.16",
"cakephp/cakephp": "~3.0",
"mobiledetect/mobiledetectlib": "2.",
"cakephp/migrations": "~1.0",
"cakephp/plugin-installer": "",
"dakota/cake-excel": "3.0.x-dev"
},
"require-dev": {
"psy/psysh": "@stable",
"cakephp/debug_kit": "~3.0",
"cakephp/bake": "~1.0"
},
"suggest": {
"phpunit/phpunit": "Allows automated tests to be run without system-wide install.",
"cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."
},
"autoload": {
"psr-4": {
"App": "src"
},
"files": [
"vendor/xtcpdf.php"
]
},
"autoload-dev": {
"psr-4": {
"App\Test": "tests",
"Cake\Test": "./vendor/cakephp/cakephp/tests"
}
},
"scripts": {
"post-install-cmd": "App\Console\Installer::postInstall",
"post-autoload-dump": "Cake\Composer\Installer\PluginInstaller::postAutoloadDump"
},
"minimum-stability": "dev",
"prefer-stable": true
}
my config/bootstrap.php:
Plugin::load('Dakota\CakeExcel', ['bootstrap' => true, 'routes' => true]);
The error I get:
Make sure your plugin Dakota\CakeExcel is in the /var/www/otrs.fis-asp.de/htdocs/cake/plugins/ directory and was loaded.
Is it a bug of cakehphp that the error message indicates its searching for the plugin in plugins? or a misconfiguration on my end? Because in cakephp3 it should search in vendor...
There is dakota/cake-excel and the file cakephp-plugins.php maps that correctly.
Can anyone help me finding the problem? Thanks!
I'm currently working with CakeExcel and noticed that my formulas are showing zero as result.
After reading this I've decided to try it by myself and got surprised to see that it's forced to false.
Why is this forced to false? Can we consider setting it to true? Or, maybe better, add some way to configure it...?
Thanks in advance
I have everything set up as per the README file.
I've copied and pasted the config/bootstrap.php
and config/routes.php
lines. In my AppController.php
file I have set up the RequestHandler
component as required and I have a default template in Template\Layout\xlsx\default.ctp
containing the one line as suggested.
I added the link ($this->Html->link('Excel file', ['_ext' => 'xlsx'])
the controller's index.ctp
file, and I have a xlsx\index.ctp
file in the Template directory. When I load the page, the link is echo'd as localhost\site\example.xlsx
where controller is the name of the controller. Clicking on this, it gives me a Controller class Example.xlsx could not be found.
error. When I type the URL localhost\site\example\index.xlsx
in the address bar, I get Error: Create ExampleController::index.xlsx() in file: src\Controller\ExampleController.php.
error.
What am I doing wrong?
im using CakeExcel and it's working if i use xls extiontion but throwing exception if i use xlsx
exception is :
Could not close zip file php://output.
Thanks
There is any plan to upgrate this plugin to use recent version of cakephp and PhpSpreadsheet? PHPExcel is no longer maintained.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.