Make Google Drive Excel Document Presentable with PHPrunner |
8/10/2024 4:34:49 AM |
PHPRunner General questions | |
J
Jan author
Hello everybody, With a Google rest-api connection, a list can be retrieved from Google drive that can be displayed with phprunner. A working example can be found here. https://xlinesoft.com/blog/2021/11/02/working-with-google-drive-rest-api/ Is it also possible to display the data of an Excel document that is in Google drive with phprunner? |
|
M
|
MikeT 8/10/2024 |
Google has an API for sheets with lots f examples: https://developers.google.com/sheets/api/guides/concepts |
C
|
cristi 8/10/2024 |
You can look at the example here Another way would be to use an open source library like phpspreedsheet that Fernando made a lot of tutorials on how to use it. $writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet); //create the writer You can then display the generated html with an iframe inside a popup or use sweetalert 2 that can display html content This way you have your own solution - but you still need the google cloud api to get the files. Be aware that: "HTML limitations Please note that HTML file format has some limits regarding to styling cells, number formatting, ... Declared charsets compatible with ASCII in range 00-7F, and UTF-8/16 with BOM are supported" - so if your excel files are formatted the preview will look kind of "funny"... |