input data in asp.net and analysis with pivot table

G

Grey

I have created a asp.net form for user to input data. After input the data,
user need to click a button to export the input data to excel for data
analysis with excel pivot table function. is it possible to do that?? if so,
any sample for me as i am a new in designing pivot table with asp.net


million thanks
 
P

Prodip Saha

Grey,
I don't know the architechture of your aspx project. One of the way you can achieve this by using an excel template file with -a dynamic data source, a pivot table and a pivot chart(if you need it as well). I did this by using a 3rd party excel writer tool called aspose.excel because I can run multiple instances without any problem. You should be able to use Excel Interop to accomplish this.

The idea, in simple term, is-- overwrite the data source worksheet and set the option for the pivote table to refresh on data change. When you open the excel file, the pivot table is populated with new information.

Hope this help.
Prodip

How to create a dynamic data source?
Use a Dynamic Data Source

You can use a dynamic formula to define the source range for a Pivot Table. As new items are added to the table, the named range will automatically expand.

1. Name the Range

1.. Choose Insert>Name>Define
2.. Type a name for the range, e.g. Database
3.. In the Refers To box, enter an Offset formula that defines the range size, based on the number of items in a column that doesn't contain any blank cells. , e.g.:
=OFFSET(Data!$A$1,0,0,COUNTA(Data!$A:$A),7)
In this example, the list is on a sheet named 'Data', starting in cell A1. The arguments used in this Offset function are:
1.. Reference cell: Data!$A$1
2.. Rows to offset: 0
3.. Columns to offset: 0
4.. Number of Rows: COUNTA(Data!$A:$A)
5.. Number of Columns: 7
Note: for a dynamic number of columns,
replace the 7 with: COUNTA(Data!$1:$1)
4.. Click OK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top