GithubHelp home page GithubHelp logo

Comments (5)

alhimik1986 avatar alhimik1986 commented on July 29, 2024 1

I have released the v1.0.14. I hope it will work.

from php-excel-templator.

alhimik1986 avatar alhimik1986 commented on July 29, 2024

Hello.
Please, leave the full code and xls-template file to easily reproduce the bug.

from php-excel-templator.

vaneatka avatar vaneatka commented on July 29, 2024

`
require 'vendor/autoload.php';

use alhimik1986\PhpExcelTemplator\PhpExcelTemplator;

$documentData = [
'[lineNumber]' => [
1, 2, 3
],
'[descriptions]' => [
'Description 1',
'Description 2',
'Description 3',
],
'[price]' => [
2, 3, 4
],
];

$template = 'template/template.xlsx';
$outputPath = 'output/output.php';

PhpExcelTemplator::saveToFile(
$template,
$outputPath,
$documentData
);
`
The template content is this one.
image

Repl link on it

from php-excel-templator.

alhimik1986 avatar alhimik1986 commented on July 29, 2024

I couldn't reproduce the bug. Everything working well. At least it worked on my old code.
I corrected the require_once('vendor/autoload.php'); to require( __DIR__ . '/../Bootstrap.php');
and the $outputPath = 'output.php'; to $outputPath = 'output.xlsx'; because the code just not launching.

Update:
I have adapted my code for modern PhpSpreadsheet.
Try to update the templator to latest version.

from php-excel-templator.

vaneatka avatar vaneatka commented on July 29, 2024

I've updated it in repl,
Repl

Can you please recheck it there?

from php-excel-templator.

Related Issues (20)

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.