C# Sample code for generating XLSM documents with PivotTable. Use this code for creating Micorsoft Excel XLSM files with PivotTable within VB.NET, Asp.NET or any .NET bAsed application....C# Sample code for generating XLSM documents with PivotTable. Use this code for creating Micorsoft Excel XLSM files with PivotTable within VB.NET, Asp.NET or any .NET based application.