Better documentation #3748
Replies: 6 comments
-
Which part of the Hello World example $writer = new Xlsx($spreadsheet);
$writer->save('hello world.xlsx'); is difficult? |
Beta Was this translation helpful? Give feedback.
-
It saved a blank workbook and not a copy of the revised workbook. I guess I need to post more code? |
Beta Was this translation helpful? Give feedback.
-
The difficulty is that the documentation is sparse and there are no real good examples. As well, it's difficult to troubleshoot the errors thrown. Even though PHPExcel has been discontinued, it i still an easier library to use. |
Beta Was this translation helpful? Give feedback.
-
I'm struggling to work out how we can provide better documentation. What more do you expect to find? |
Beta Was this translation helpful? Give feedback.
-
Well I have a difficult time finding an example to read, edit, and write to a new file on disk. I was able to piece it together with help. My concern are cryptic class error messages like the one I am getting. It seems that my workbook, which contains a spreadsheet with a calculator (lots of formulas) cannot be saved. A better error message would be helpful. Fatal error: Uncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: Table Table26 for Structured Reference cannot be located in /home/httpd/www/my-directory/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php:150 |
Beta Was this translation helpful? Give feedback.
-
Perhaps then you might consider submitting a PR to improve the documentation. What would you consider good examples? Fatal Errors are another matter, especially in something as complex as the Calculation Engine, but I'm not sure how easy it is to come up with something that doesn't rely on a developer having some basic understanding of Excel itself, and knowing what a Structured Reference is in Excel. The simpler the message for an end-user developer (e.g. "The file cannot be saved because it contains a formula error referencing a non-existent 'Table 26'") the more useless it is to help resolve the problem. And requires context as well: the calculation engine doesn't know that it's being executed as part of a file save action, and can be called in other contexts, such as calculating cell values from a loaded file. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. Is there a user group or perhaps better documentation than https://phpspreadsheet.readthedocs.io/en/latest/?
I am having trouble figuring out what should be simple things.
For example, I've loaded a workbook and modified the first spreadsheet. I would like to save it as a new file in a new directory but I cannot find out how to do this?
Beta Was this translation helpful? Give feedback.
All reactions