We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Pivot Table Causes a Crash

Hi,


The link to an excel export below was created with aspose and contains a pivot table:

https://www.dropbox.com/s/6vz9ewgv2c6ahk8/Copy%20of%20AA_20130802_091715_2415057.xlsx

The issue is, when this is then provided as the basis of a template, aspose will throw an error:

Workbook myWorkbook = new Workbook();
myWorkbook = new Workbook(templatePath);

for (int i = 0; i < DataSources.Count; i++)
{
Worksheet myWorkSheet = CreateRawDataWorkSheet(i, myWorkbook);
}

I can confirm the dataasource is issue free and works fine when a template is used:

//Create a new WorkBook
myWorkbook = CreateWorkBook();

This is the error:
System.NullReferenceException: Object reference not set to an instance of an
object. at •Ÿ..InsertRows(Int32 , Int32 , Worksheet ) at
•Ÿ..InsertRows(Int32 , Int32 , Worksheet ) at Aspose.Cells.Cells.š(Int32 ,
Int32 , ‡‹ ) at Aspose.Cells.Cells.ImportDataTable(DataTable dataTable, Boolean
isFieldNameShown, Int32 firstRow, Int32 firstColumn, Int32 rowNumber, Int32
columnNumber, Boolean insertRows, String dateFormatString, Boolean
convertStringToNumber) at Aspose.Cells.Cells.ImportDataTable(DataTable
dataTable, Boolean isFieldNameShown, Int32 firstRow, Int32 firstColumn) at
Aspose.Cells.Cells.ImportDataTable(DataTable dataTable, Boolean
isFieldNameShown, String startCell)

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try the latest version Aspose.Cells
for .NET v7.5.1.3
and see if it works for you.

If your problem still occurs, please provide us your runnable source code to replicate this issue with the latest version. We will look into it and update you asap.