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

Free Support Forum - aspose.com

How to use Designer and Pivot Tables

Greetings from Texas!

I’m doing a project that requires Excel output, naturally. The desired output will have a pivot table on one of the pages. I’m trying to figure out how best to use the designer feature to do this. I’ve searched through the forums and the documentation, and I haven’t found any example that I might follow. Do any examples exist?

I’m enjoying the development. I can see a lot of the original Excel object model, and it’s really nice.

A couple of suggestiongs for future consideration.

I used the cells.ImportDataTable to bring in the data. Very nice. However, I stumbled across this by reading the forum. Originally, I used a datareader to bring the data in, then I loaded it one record at a time. Still pretty fast, but maybe you’d want to add a similar function using a datareader object instead. One idea.

I then played with the AutoFitRow and AutoFitColumn. Is there anyway to apply that to the entire sheet object, or do I need to “walk” over every column and row? Just curious. I haven’t seen it discussed much in the forum, but I might have missed something.

Keep up the good work! It looks like an excellent product, that I will be able to recommend to my clients in the future.

BTW - I was led to exploring this product from the article in October 2003 ASP.NET Pro Magazine.


Dear Tuc,

Thanks for your consideration.

About using designer and Pivot tables, you can create an Excel file contains static data, images, charts, formats, pivot tables and other contents. Then you can use Excel.Open to read this file. All contents will be inputed.
You can use Aspose.Excel api to insert other dynamic contents. Finally the output file will contains all designer file contents and api generated contents.

Currently if you want to autoFit an entire sheet object, you have to walk over every row/column. If I provide a single api to enable such feature, I will also have to walk over every row/column :). Thus this api may be time-consuming.

I will think about your datareader suggestion.

Thanks again for your suggestion.

That was a fast reply! Thanks. I see it now.
A quick test using the file as a designer was successful.
Thanks again.


Using the latest Aspose.Cells (Aspose.Excel was renamed to become Aspose.Cells now), you do not need to use a designer or template Excel file for the task. You can create Pivot tables and pivot charts from the scratch or manipulate existing pivot tables and charts in Excel files. You may browse docs to get complete reference on different features/APIs here.