Giter Club home page Giter Club logo

cakeexcel's People

Contributors

anhtuank7c avatar antograssiot avatar dakota avatar darensipes avatar josegonzalez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cakeexcel's Issues

Get Hello World

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

PHPExcelHelper

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'); ?>

Branch for CakePHP 3.x is not working with Composer.

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 ist not loadable

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!

Controller class not found

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?

Could not close zip file

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.