Link to home
Create AccountLog in
Avatar of Scott Fell
Scott FellFlag for United States of America

asked on

Export excel sheet with usable formulas

Is it possible to export an excel file created on the fly to include formulas?

I already know about adding the header with  application/vnd.ms-excel or just exporting as a csv.  Is there a way to have a formula exported that allows the user to change data in the sheet and auto sum via a formula?

The server side language in this case would be php.
ASKER CERTIFIED SOLUTION
Avatar of Mark Brady
Mark Brady
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Hey did you get a chance to try my code sample?
Avatar of Scott Fell

ASKER

Thank you Mark.

I just saw your answer.   It looks like you are referring to https://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.spreadsheet-excel-writer-worksheet.writeformula.php

Reading through that library does not seem promising because bugs go back to 2009 that are still open. https://pear.php.net/package/Spreadsheet_Excel_Writer/download

 I don't have this installed.  Are you currently using this?  On windows or Linux?
I have only ever used the native php library to do excel functions including saving formulas. If you want to look at alternatives I would take a look at this one. It seems to do what you want.

http://www.phpclasses.org/package/6235-PHP-Parse-and-access-binary-Excel-files-in-pure-PHP.html