Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Intro

Add Excel's grouping and outlining functionality to a workbook with ExcelWriter to display nested data.

Choose a year from the dropdown list below.  This is a SQL parameter that retrieves order data from the AdventureWorks database for a particular year.  The sales data is written into the worksheet and grouped by major product category.  Subtotal lines are written after each major product category.  Each group of product sales line items is also grouped into a collapsible outline.

If you need to display nested, subtotaled data in your Excel report, this demo will be particularly useful to you.

Code

Downloads

Data: GroupingComponents.csvGroupingBikes.csvGroupingClothing.csvGroupingAccessories.csv

Template: GroupingAndNestingTemplate.xlsx

Output: GroupingSubtotals_output.xlsx

  • No labels