Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Issue: Implement Subtotals [7862]

$
0
0
I'm not sure how to upload a file, but here's an example. Let me know if that helps. I think, using the examples of formulas and ranges you gave above, I could make it work for the specific spreadsheet I'm working on. The problem is, I'd have to figure out how to do it for each spreadsheet that uses subtotals. I'd like an easy way to define what field to break on and which columns to add or count or whatever for the subtotal.
 
 
Name Date Amount
Joe Blow 2-Mar-2011 50.00
Slim Jim 2-Mar-2011 45.00
Bobby Boy 2-Mar-2011 50.00
2-Mar-2011 Total 145.00
Joe Blow 5-Mar-2011 30.00
Bobby Boy 5-Mar-2011 25.00
5-Mar-2011 Total 55.00
Someone Else 7-Mar-2011 50.00
Still Another 7-Mar-2011 25.00
7-Mar-2011 Total 75.00
Grand Total 275.00
Comments: Right now nothing, we have outlines and the ability to resolve formulas. The API can look like the following:[0A][0A]range.AddSubtotal([0A] atEachChangeIn, // String[0A] useFunction, // Enum[0A] replaceCurrentSubtotals, // optional Boolean[0A] pageBreakBetweenGroups, // optional Boolean[0A] summaryBelowData // optional Boolean[0A])[0A]// It would return an object with the following two methods:[0A].ToColumn( String / Integer ) // Column name or column number[0A].ToColumns( String[] / Integer[] ) // Columns to add the subtotal to[0A][0A]What do you think?

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>