[Pivot Table] Configuring style inside pivot table (color, font, additionnal columns, ...)

47 views
Skip to first unread message

arkh...@gmail.com

unread,
Sep 28, 2017, 4:33:22 AM9/28/17
to axlsx
Hello,

First, I apologize for my poor english, I'm a french speaking guy.

I'm trying to use axlsx to generate pivot tables under linux and the final user will open the files under windows and excel 2010. With some adjustements, it works with :

sheet.add_pivot_table 'A1:H100', "A301:BW"+a.to_s do |pivot_table|
pivot_table.rows = ['LIB_SOURCE', 'FISCAL_YEAR', 'ACCOUNTING_PERIOD', 'DOC_SEQ_DATE', 'OPRID', 'BUSINESS_UNIT_IU', 'LIB_BU']
pivot_table.columns = ['LIB_DATA']
pivot_table.data = ['DATA']
end

I've managed to modify font globally using sheet.styles.fonts.first.sz = 8

But I have to :
- remove the grand total column at the rightest position of the pivot table.
- putting a font color on the intermediate total rows of the pivot table.

Altering normal rows and columns is an easy task but inside a pivot table, it seems more diffcult.

Anybody knows how to do it?

Reply all
Reply to author
Forward
0 new messages