Adding subtotals and their groups to an excel file

Issue #679 closed
Ryan Brown created an issue

Hello,

I have a use case where the user wants a generated excel file (formula-less) that has subtotals in place for certain fields. I noticed grouping was an option, but is subtotaling one as well? I don't think I could see it in the documentation. If not, I was wondering if I'd be able to do something like:

import openpyxl as pyxl

wb = pyxl.load_workbook(mypath)

ws = wb.get_sheet_by_name(sheet_name)

ws.apply_groupings([[column_name,function_to_apply,column_to_apply],[repeat]])

in the future or what areas of the documentation I could employ already to achieve similar output to the attached.

Thanks!

Comments (3)

  1. CharlieC

    I don't know about subtotal but it sounds like you want to use outlines. Please use the mailing list for general questions.

  2. Log in to comment