Implement pivot tables


Implement pivot tables


wrote May 5, 2008 at 7:07 PM

troyl wrote May 5, 2008 at 7:11 PM

This would be a big feature for my company. We currently have excel report saved in the database that all use pivot tables to read from a hidden data sheet that we refresh on generation. The users are use to being able to sort and filter with the pivot table headers. I would love to get rid of these excel files and use PHP to generate this reports in whatever format the user selects.

wrote Aug 29, 2008 at 8:23 AM

wrote Jun 15, 2009 at 9:36 PM

pcarvalho wrote Mar 4, 2010 at 4:40 PM

No news since 2008. Is anybody working on it ? It's really a great feature in Excel 2007

wrote May 4, 2010 at 2:42 PM

MarkBaker wrote May 5, 2010 at 8:34 AM

Still not yet in progress. It's on the "to do" list, but not very high up on that list, and we are a very small group of developers

feamsr00 wrote May 5, 2010 at 1:36 PM

What would it take (in theory) to make the parser at least non-destructive to pivot tables? or perhaps to have the capability to pass through/save elements it doesn't "understand". Is the oxml format structured enough to do that?

feamsr00 wrote Aug 19, 2010 at 2:39 AM

I am rather interested in at least the theory behind why this would take much effort, and why/how the format/api prevents non-destruction from being easy to do. What would it take to at least allow the parser to pass-through unfamiliar elements as to avoid non-destruction?

MarkBaker wrote Aug 20, 2010 at 11:25 PM

See my latest response to this discussion http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=223983 for a brief explanation of why PHPExcel cannot simply pass-thru unfamiliar elements

wrote Oct 8, 2010 at 6:56 PM

wrote Dec 6, 2010 at 8:33 PM

wrote Dec 20, 2010 at 5:23 PM

wrote Jan 7, 2011 at 7:13 PM

yo9gnc wrote Feb 1, 2011 at 3:44 PM

so maybe is it difficult to create an excel pivot. but : how about editing the source of an existing excel file that already has a pivot that will autorefresh on open ? all that is there to do, is to create another sheet instead of the original one which has the original source.

to make myself clear: we have a file test.xlsx (or xls >=2003 version). in the file we have a sheet "pivottable" which represent the pivot table with the source "Sheet1!$A$1:$M$65536".

so all we have to do is either to delete the Sheet1 sheet and recreate it, or just to erase the existing data and repopulate the values.

the sheet "pivottable" from my example has checked the option "auto refresh pivot when document opens". the theory works. i use it for the moment with ms sql dts. i delete the sheet and recreate it.

this will not create a pivot, but you may use an already existing template.

wrote Apr 12, 2011 at 4:00 PM

wrote May 2, 2011 at 10:44 AM

wrote May 9, 2011 at 1:31 AM

wrote Jul 23, 2011 at 4:19 PM

wrote Dec 21, 2011 at 4:36 PM

wrote Feb 22, 2013 at 3:05 AM

MarkBaker wrote Aug 18, 2013 at 12:03 PM

An experimental version of reading/creating/writing pivot tables for Excel2007 is currently under test, and likely to be available (as an experimental extension) for the next release

Ajaykurmi wrote Aug 23, 2013 at 7:48 AM

It would be nice to get Pivot in Excel2007 ... I am still waiting for it since your last release.
Can you tell me what is your plan for next version release...
Thanks in advance.

wrote Aug 23, 2013 at 4:21 PM

Ajaykurmi wrote Aug 30, 2013 at 7:28 AM

Hello @mark Baker

Can you please answer about your next release..of PHPExcel..

Raghbendra wrote Sep 3, 2013 at 12:15 PM

Hi Mark,

Can you please let me know about "An experimental version of reading/creating/writing pivot tables for Excel2007" ?

When it will release?


MarkBaker wrote Sep 9, 2013 at 11:02 PM

The PR that I've retrieved can read a file with an existing pivot table defined (such as a template), and maintain it as raw XML so that it's still available for saving again. While the underlying data can be changed, it can't be extended beyond the cell range of the original pivot, not can the dimensions, etc be changed under code control. I'm looking at how it can be modified to change the data cell range at least, so that it's more useful for adding new data rows to the pivot range, even if not new columns.

MarkBaker wrote Sep 9, 2013 at 11:11 PM

Next release is likely to be sometime in October... in addition to the bugs already fixed in the development branch on github, and the pivot tables (which I'll incorporate even if I can't make the cell range changeable), I also have a PR that fixes stock charts that I'm currently testing which are likely to be included.

wrote Jan 23, 2014 at 3:25 AM

bcgarcia wrote Mar 11, 2014 at 4:46 PM

Hi everybody.

the last version was already come out and pivot tables does not implemented yet, i would like know if the pivot tables functions will be implemented earlier or if this functions delayed.

thanks to developers for de great job that they are doing


wrote Jun 30, 2014 at 9:19 AM

wrote Sep 23, 2014 at 4:25 PM

wrote Mar 24 at 2:48 PM

wrote May 4 at 8:47 PM