?
Solved

Generating Excel in php

Posted on 2013-11-07
2
Medium Priority
?
284 Views
Last Modified: 2013-11-07
I am accustomed to generating Excel spreadsheets in php programs using

header("Content-type: application/vnd.ms-excel");
$fn = "excel" . date('Y-m-d_h_i') . ".xls";
header("Content-Disposition: attachment; filename=" . $fn);

I now have a customer that wants excel formulas in cells, etc.

I'm guessing that when I understand the details of the formulas, I can just print those formulas in the appropriates cells; like sum(G4:G67), etc.

There is apparently a Ruby on Rails Gem that does all this.

https://rubygems.org/gems/axlsx

Is there anything comparable in php?
0
Comment
Question by:Richard Korts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39632137
PHPExcel has all the classes for you including adding formulae to cells

http://phpexcel.codeplex.com/

Would be a lot easier than writing up all your own code.
0
 

Author Closing Comment

by:Richard Korts
ID: 39632166
Great.

Look for my next question about YAML.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question