Creating pivot tables with xlsgenxlsgen 4.0 makes it possible to create pivot tables in XLS files and in XLSX files (and their variants).
The pivot table above can be created with 6 lines of source code :
IXlsPivotTable pt = wkshtNew.NewPivotTable();
pt.DataSource.Range = "JUNCT!A1:S1000";
pt.Rows.AddByName("YR_INST");
pt.Rows.AddByName("DESCRIPT");
pt.Data.AddByName("ID");
pt.InsertAt(2,2);
Among custom options are : sorting/filtering, aggregate functions, pivot style, ...