Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use PhpSpreadsheet without installation (like PHPExcel)

According to the PhpSpreadsheet Doc it's neccessary to install it with composer. In my case I just have a webspace without Terminal but Plesk. Is it anyway possible to use PhpSpreadsheet, like it is with PHPExcel where you just have to place the files in any location? What do I have to do to get it run? I found no further information how to with only FTP webserver access.

like image 611
MaggusK Avatar asked Feb 13 '18 12:02

MaggusK


4 Answers

In your case there are two options for you!

Answer: 1

Alternative method without terminal

Run composer with a PHP script in browser

Answer: 2

Third party sites, which allow to download composer packages online. get PHPspreadsheet latest version.

https://php-download.com/package/phpoffice/phpspreadsheet

Bonus You can download almost any composer packages @ https://php-download.com

like image 173
Smartpal Avatar answered Nov 07 '22 06:11

Smartpal


Have you considered installing composer locally, running it as instructed, and then just sending the generated files to the server via normal FTP? You install composer on your computer and run it there, then upload via FTP/SFP...

Composer is not "necessarily" intended to run live while the user is downloading the pages, it is intended to be run "mainly" on your local computer and generating the files and dependencies that later on you upload to the server. It can update the files on your server, but that is a convenience not a necessity.

like image 10
FrancescoMM Avatar answered Nov 07 '22 06:11

FrancescoMM


By registering custom autoloader and PSR simplecache autoloader it is possible to fully workaround composer installation - see:

https://github.com/PHPOffice/PhpSpreadsheet/issues/31#issuecomment-354502740

Please note, that installation via composer is currently the only officially supported solution.

like image 2
lubosdz Avatar answered Nov 07 '22 05:11

lubosdz


I had the same problem. I downloaded Library on github from https://github.com/PHPOffice/PhpSpreadsheet and made a few changes

  1. changed its namespaces
  2. used autoload.php file
  3. It worked

the Library without the need of Composer is in this link https://github.com/YoloZoloo/PhpSpreadSheet/tree/master

You can change the folder name to any folder you like. Load [AnyFolder]->table.php from your server and press 「ダウンロード」.

Hit back to me if you encounter any issues

like image 2
YoloZoloo Avatar answered Nov 07 '22 06:11

YoloZoloo