Solved

Generating Excel in php

Posted on 2013-11-07
2
281 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 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Ajax and PHP 4 47
scan php uploads for viruses 5 26
Change a button after e-mail 4 21
curl parse data from site 20 44
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

726 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