This topic is locked
[SOLVED]

 PHPExcel - PHPspreadsheet Plugins in General

11/1/2019 2:28:55 PM
PHPRunner General questions
lefty author

I added a plugin phpspreadsheet to my source folder PHPspreadsheet as PHPexcel is deprecated in 7.0 php. Xlinesoft is still using PHPexcel . I can send emails as attachments from the old PHPexcel but this particular script will not work in PHP 7.0 +
It's actually this line of code that is supposed to open excel in browser for download. won't work in 7.0 with deprecated PHPexcel.
$objWriter->save('php://output'); // does not work with PHPexcel in anything PHP 7.0 or + .Here is an older topic on the same subject but now I need it to go to the browser , which don't work with PHP 7 it seems.
So thinking I can add phpspreadsheet to the source folder in the latest build , I could fix this . NOT
I build my project and the plugin is not there . It seems any custom plugins added to the plugins folder in the source code do not get generated into a project and build. Click Here old topic but should work
So I injected it myself into the output folder but because I get a 500 error on the button handler in debugging can't find params f - ???? proto . Json. If I just send the xlsx file as an email attachment it works perfect.
I have checked in tips and tricks and fhumes has some examples ( but no databases to test them ) great example of pdf files which he is using in a button , but the code if far more than I need and templated. His code does not actually show you how to install the phpspreadsheet unforunately. He uses composer I assume , Can't use this in my situation as one it is way too much time and two not need when the zip file can be extracted and just added to plugins folder and call it using autoloader.
Anyone Ideas ???
10.3 Build 33877

10.3 Build 33978 ( beta )

woodey2002 11/3/2019

Hi John,
When adding external JS libraries, I follow the instructions outlined is this video tutorial.
https://www.youtube.com/watch?v=9ltwvsZH0vY
Using the principles here may at least get the library into your built project.
If you add a library using the method mentioned in the video, you need to restart phprunner before its available.
Hope this helps somewhat.
Cheers,

James

lefty author 11/3/2019



Hi John,
When adding external JS libraries, I follow the instructions outlined is this video tutorial.
https://www.youtube....h?v=9ltwvsZH0vY
Using the principles here may at least get the library into your built project.
If you add a library using the method mentioned in the video, you need to restart phprunner before its available.
Hope this helps somewhat.
Cheers,

James


Thanks James,

Looks like that may work for that situation . Although if I add to the source / Plugins folder ( option 1 or 2 ) , it should do the same thing and not using client before but using on server code. This always worked in 9.8 or below . Maybe they changed this. Unfortunately this a going to be a template that is going to be offered in the xlinesoft marketplace and needs to be clean code , so I can't use the solution in the video due to having to change the header and having to edit html . Unfortunately I need this to be clean html without editing anything in editor like we used to , from anyone who uses the template so they do not have to enter the extra code ( I will have to investigate further to see if the template will carry over the code to a new project ).. But it does give me some ideas . So I appreciate you taking the time to remind of the video.
As far as my code for PHPexcel , It is stored in the button handler event and keep getting 500 error when I try to output to browser . Weird thing is I can send it as an attachment but can't output it to the browser. I looked at the Excel output function built in

and it does use (php://output) , so I am stuck here as usual . Spent 20 hours on this . I am done with it . Just am taking it out of the picture. The user will have to decide Unfortunately. It's really a shame that samples for these situations are not provided and the fact that PHPexcel is still even being used . Not only that xlinesoft is using an outdated version 1.7 which was from 2012 , instead of 1.8 ( 2015 ) which are all deprecated and phpspreadsheet is what works the best with PHP 7+ but can't install it correctly. I keep loosing it in the builds.
Another issue I found is that custom buttons that are deleted do not get removed permanetly ( they still exist in the code ) . I removed some test button's and looked at the project and all the initial test buttons are still in the output folder after doing a clean build and new output folder . Seems another issue. I think what is happening is ,it is saving them for the option in designer to use them over again. They need to add an option in designer to delete past test buttons, so if you make ten test buttons save , guess what , they come back on build after removing them. Thanks for the post.

Admin 11/3/2019

Both adding files to 'source' folder and to 'Custom files' section in Editor will work in PHPRunner 10.x.
All you need to do is to add your PHP files using either option, reference them in the project and use relevant functions in your buttons and events. No need to edit any HTML or watch any videos.

https://xlinesoft.com/phprunner/docs/how_to_add_external_files.htm

lefty author 11/4/2019



Both adding files to 'source' folder and to 'Custom files' section in Editor will work in PHPRunner 10.x.
All you need to do is to add your PHP files using either option, reference them in the project and use relevant functions in your buttons and events. No need to edit any HTML or watch any videos.

https://xlinesoft.co...ernal_files.htm


I guess after application is initialized and include the file along with dbcommon session variable is the best route. I was always used to just adding it to the plugin section of PHPrunner and calling it from there. Thanks
Update : Custom Buttons are all at the bottom of the event page and can be deleted there by right clicking and hit delete. Did not see that as you have to go all the way to the bottom.