PivotTable class properties not working

Hi ,

I am working on pivot table formatting and styling but I don’t find any option for it other than the excel AutoFormats. I tried PivotTableStyleType property but it doesn’t work. I’m using the latest vesion of Aspose.Cell.dll (version - 7.0.4.0).

There are two more properties that don’t seem to be working, these are IsGridDropZones and

ShowDrill.

Please help!!

Thanks,
Priya

Hi,

Please download and try the latest version:
Aspose.Cells
for .NET v7.0.4.3
and let us know if these properties work.

Also try saving your output file in Xlsx format instead of XLS to see if the results are fine.

If the problem persists, then please provide us a sample code/console application illustrating your issue.

We will look into it and help you asap.

Hey,

I tried that and it worked only i save the document . But my requirement is to write the file to http response stream and not saving it, can you please let me know how can I write the xlsx fil ein response stream. the code fro writing xls file is

protected void WriteExcel2003FileToHttpResponse(HttpContext currentHttpContext, WorkbookDesigner wkBkDesigner, string fileNameNoExtension)
{
byte[] wbBytes = wkBkDesigner.Workbook.SaveToStream().ToArray();

currentHttpContext.Response.Clear();
currentHttpContext.Response.ContentType = “application/vnd.ms-excel”;
currentHttpContext.Response.AddHeader(“content-disposition”, “attachment; filename=”" + fileNameNoExtension + “.xls”");
currentHttpContext.Response.OutputStream.Write(wbBytes, 0, wbBytes.Length);
currentHttpContext.Response.Flush();
currentHttpContext.Response.End();

}

Hi,


I think you may try to change a line of your code if it works fine, e.g
protected void WriteExcel2003FileToHttpResponse(HttpContext currentHttpContext, WorkbookDesigner wkBkDesigner, string fileNameNoExtension)
{
byte[] wbBytes = wkBkDesigner.Workbook.SaveToStream().ToArray();

currentHttpContext.Response.Clear();
currentHttpContext.Response.ContentType = “application/vnd.ms-excel”;
currentHttpContext.Response.AddHeader(“content-disposition”, “inline; filename="” + fileNameNoExtension + “.xls"”);
currentHttpContext.Response.OutputStream.Write(wbBytes, 0, wbBytes.Length);
currentHttpContext.Response.Flush();
currentHttpContext.Response.End();

}


Check a topic for reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/pivot-table-issue.html