Giter Site home page Giter Site logo

fast-excel-templator's People

Contributors

avadim483 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

webappbuilder

fast-excel-templator's Issues

File exist error when using the save() function

I am attempting to fill out an Excel form using the templator. However, whenever I attempt to save the file (even without doing any editing, the fatal error below will still show up).

[14-Mar-2024 07:04:21 UTC] PHP Fatal error:  Uncaught avadim\FastExcelWriter\Exceptions\Exception: File "/var/www/html/wordpress/wp-content/plugins/judges-form-auto-generate/files/tmp/output.xlsx" already exists in /var/www/html/wordpress/wp-content/plugins/judges-form-auto-generate/lib/composer/vendor/avadim/fast-excel-writer/src/FastExcelWriter/Exceptions/Exception.php:20
Stack trace:
#0 /var/www/html/wordpress/wp-content/plugins/judges-form-auto-generate/lib/composer/vendor/avadim/fast-excel-writer/src/FastExcelWriter/Writer.php(350): avadim\FastExcelWriter\Exceptions\Exception::throwNew()
#1 /var/www/html/wordpress/wp-content/plugins/judges-form-auto-generate/lib/composer/vendor/avadim/fast-excel-writer/src/FastExcelWriter/Excel.php(203): avadim\FastExcelWriter\Writer->saveToFile()
#2 [internal function]: avadim\FastExcelWriter\Excel->__destruct()
#3 {main}
  thrown in /var/www/html/wordpress/wp-content/plugins/judges-form-auto-generate/lib/composer/vendor/avadim/fast-excel-writer/src/FastExcelWriter/Exceptions/Exception.php on line 20

I noticed that the file is still written when using the template() function. Maybe that is why the Writer is not liking it.

Declaration incompatible

when I use:

require 'FastExcelReader/autoload.php';
use \avadim\FastExcelReader\Excel as ExcelReader;
require 'FastExcelWriter/autoload.php';
use \avadim\FastExcelWriter\Excel as ExcelWriter;
require 'FastExcelTemplator/autoload.php';
use \avadim\FastExcelTemplator\Excel as ExcelTemplator;
$excel = ExcelTemplator::template('./test/file1.xlsx', './test/file2.xlsx');

I get:

Declaration of avadim\FastExcelTemplator\Excel::createSheet(string $sheetName, $sheetId, $file, $path, $excel): avadim\FastExcelTemplator\Sheet must be compatible with avadim\FastExcelReader\Excel::createSheet(string $sheetName, $sheetId, $file, $path): avadim\FastExcelReader\Sheet

How to solve?

Xslx with shared strings (fixed dropdown values) - is it possible to template.

I have been given a xlsx template to populate with lots of cells with fixed drop downs (shared strings?) - like 'Yes' and 'No'... It is possible to set these properly using templator? Excel seems to set them as "shared string" (?) integer values, but templator just replaces these with a string value. I can find the values of the shared strings.

excel-dropdown-example-1 excel-dropdown-example-2

If I get the row template:

$rowTemplate = $sheet->getRowTemplate(3);
dpm($rowTemplate);

I get the following definition for the cell:

excel-dropdown-example-j-column-data-format

templater doesnt run the formulaes at the end

I'm working with an Excel (.xlsx) template file that contains charts and formulas. I'm using the Template package to populate the template with data. However, I'm encountering an issue where the data is being updated correctly, but the cells where formulas are left blank. There should be calculated data in them.

Specifically, in the row, the formula cells are being represented like this:
[
'E' => [
'v' => (formula is here, not data, should be data),
'f' => (formula is here)
]
]

Additionally, the charts in the file are not loading correctly because the formulas haven't been executed and haven't retrieved data from other sheets.

To resolve this, I need to find a way to trigger the formulas to run before I download the updated file. How can I ensure the formulas are properly evaluated in the output file?

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.