Solved

Generating Excel in php

Posted on 2013-11-07
2
276 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
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now