Comments (6)
In cakephp, you've to use autoloading. No require_once
needed.
Did you load the plugin?
You have to add
Plugin::load('Cewi/Excel', ['bootstrap' => true, 'routes'=>true]);
in your bootstrap.php file.
from excel.
Yes this is my last line in bootstrap.php
Plugin::load('Cewi/Excel', ['bootstrap' => true, 'routes'=>true]);
I dont have problem when i use $this->loadComponent('Cewi/Excel.Import');
the problem is with public $helpers = ['Cewi/Excel.Excel']; when the helper call PHPExcel Helper.
No so much information i had check all the link in a google search. :(
from excel.
Hi Cewi,
I am trying something today. i followed this steps as you described
router.php
Router::extensions(['xlsx']);
ArticlesController:
public $helpers = ['Cewi/Excel.Excel'];
add a Folder 'xlsx' in Template/Articles and create the file 'index.ctp' in this Folder.
$this->Excel->addWorksheet($articles, 'Articles');
create the link to generate the file somewhere in your app:
Html->link(__('Excel'), ['controller' => 'Articles', 'action' => 'index', '_ext'=>'xlsx']); ?>
'_ext' is working as index.xlsx
and of course i am getting the error
Missing Method in ArticlesController public function index.xlsx()
Some advice please
from excel.
Can be something about this:
Deprecated since version 3.1.0: As of 3.1.0 the viewClassMap() method is deprecated. You should use config() to change the viewClassMap at runtime.
???
from excel.
Got it guys,
in router.php the line
Router::extensions(['xlsx']);
must be before the method Router::scope('/', function (RouteBuilder $routes) {}
Something like this:
router.php:
use Cake\Core\Plugin;
use Cake\Routing\RouteBuilder;
use Cake\Routing\Router;
use Cake\Routing\Route\DashedRoute;
Router::extensions(['xlsx']);
Router::defaultRouteClass(DashedRoute::class);
Router::scope('/', function (RouteBuilder $routes)
{
..
..
}
from excel.
that's true. If you want to use it inside a scope, you've to write $routes->extensions(['xlsx']);
Will clear that in the doku.
Have fun!
from excel.
Related Issues (17)
- composer require failed HOT 2
- Import Dates HOT 4
- Export Data- Giving Format to Excel column HOT 3
- Import & Edit HOT 2
- Composer Require
- Plugin Helper not found HOT 1
- use PHPSpreadsheet HOT 2
- Personalization of the file name HOT 1
- Problems to use the plugin HOT 4
- Cewi/Excel Deprecation HOT 2
- Creating worksheets with Date objects HOT 4
- PHPExcelHelper could not be found. HOT 2
- not working with routes HOT 1
- Export current results HOT 10
- Import Excel HOT 6
- Generating excel is slow. Trying to overwrite method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from excel.