最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - ClosedXML.Report creating an Excel template which allows both group heading, subtotals - Stack Overflow

programmeradmin2浏览0评论

I have an excel template and some C# code which is working to produce a table of data in a file using ClosedXML.Report

The bit that I can't get quite right is the heading above the data and the subtotals below along with delete, so I don't think I'm using the tags or directives correctly.

I can either get the heading above the data based on column1 and the subtotals below the data with the label column1 Total (which is fine) but then all of column1 is empty which I'd rather delete.

But when I try to use the <<Delete>> tag, column1 disappears and then causes an error with the subtotals.

I think it's possible to achieve what I need but I can't figure out how to get the directives/tags right.

Here's an image of the table from the excel template, I can provide more info and code if required.

excel table screenshot

Column1 Column2 Column3 Column4 Column5 Column6 Column7 Column8 Column9 Column10 Column11 Column12 Column13 Column14 Column15 Column16 Column17 Column18 Column19
{{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}} {{item.column1}}
<<group withheader PlaceToColumn=2 TotalLabel='Totals:'>> <<DisableGrandTotal>> <<sum>> <<sum>> <<sum>> <<sum>>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论