I have a financial calculator in MS excel, and I basically want to display it on my website. It's not a big database file or anything, it is a simple user interactive savings calculator. I know about the fgetcsv() function where I can import a csv file using php, but my excel file contains formulas and cell associations.
How could I import the excel calculator into php and display it on a webpage?
I would appreciate any advice.
Thanks
Take a look at PHPExcel, especially the Quadratic equation solvers in the /Tests directory... that will show you an example of how this can be done.
It isn't a mortgage calculator, but a form that accepts inputs from a user, uses those values to populate cells in a spreadsheet, accesses formulae defined in that spreadsheet, and displays the results of those calculations.
Related
I've been using PHPExcel for about a year to import data from spreadsheets in random cells. The code looks like this:
$value1 = test_input($objPHPExcel->getActiveSheet()->getCell('B13')->getCalculatedValue());
Recently, I changed the Excel sheets to run a more complex formula. The basic premise is that the sheet pulls data from a mySQL DB, which in turn is used in vlookups based on a dropdown to populate several fields. All relevant fields across the workbook are referenced on a final sheet for importing into the DB.
The problem now is that PHPExcel is crashing (diagnosing in NetBeans) when it comes to the cells with these calculated formulas. It works fine with most formulas, but when referencing cells which reference the cells with if > vlookup > ODBC link to mySQL, it crashes the program and stops the file import. Should I be using a different function, or what is causing it not to return the value?
Thanks in advance...
I have written some PHP that uses a simple HTML form to take in an ISBN number, uses that number to search Amazon's database, gets the book title and pricing information and then exports the information to notepad.
What I need to do now is change it so that a large number of ISBN's can be searched automatically. I was thinking I could do it either by having an excel sheet of ISBN's that I upload, or copy and pasting all of the ISBN's at once into a form.
I need some guidance on how to do this. I do not have a lot of PHP experience.
Thanks!
Here's a PHP library I use for my Excel needs: PHPExcel
It comes with good examples and documentation to get you started.
I'm exporting data in excel sheet via drupal view. Drupal views_export_xls module uses
http://code.google.com/p/php-excel/source/browse/branches/class-excel-xml.inc.php?r=9
library to export data into excel sheet. Every thing working fine. But i want little more from it.
How to add MACRO in excel sheet row or cell programmatically?
Is it possible to do so by php code?
If you look at above link - line no 88 & 93 which actually create cells and rows.
What i want to create a macro and place it on excel sheet that can later convert this generated excel file into native xml (.in) file for business purpose.
I've searched a lot but most of the link suggesting VB solution and i've no sense about this language.
Can anyone point me on right direction.
Any help would be greatly appreciated!
As far as I'm aware, unless the Excel writer that you're using is based around COM, then there is no way of creating a Macro in an Excel workbook.
Ok we have this prefilled excel spreadsheet that we just update our name, mileage, and location on once a month. The spreadsheet calculates our millage with the built in formulas. What I would like to do is have this page on our website. I would pull from a sql database depending on the options you select prefill my labels on the web and save it to the correct spot on the excel spreadsheet once submitted. Sounds easy in theory but I'm not sure how to go about doing this or if it is even possible? Can someone help me out or get me started in the right direction. Thanks
Take a look at PHPExcel. It allows you to read and write Excel documents (and PDFs, and OpenOffice.org Calc documents and more).
I have an excel spreadsheet that contains some formulas to calculate ROI for an upcoming product of a client. Is it possible to convert this into a php script whereby a user would type into some boxes and then submit it working out the same. The excel spreadsheet is here: http://www.solidcamxpress.co.uk/roi.xls
Sure, PHP can do math just like Excel's formulas. However, there is no magic method of converting Excel to a Web page, if that's what you're asking.
#Cameron
There is a software in the market which can convert the spreadsheet to active html/php with ease. You can get the software at the following url:
http://www.spreadsheetconverter.com
Even you can also convert the spreadsheet by yourself as it is simple to convert with scripts. but you can also this software for the conversion =)
You can use PHPExcel to read an existing spreadsheet and extract its data/formulas, but converting those formulas from Excel syntax to PHP is rather non-trivial.
Unless you're doing a generalized Excel->PHP converter, the time/effort required to write such a converter will be far greater than it would take you do analyze the one spreadsheet by hand and code up some PHP stuff to recreate it.