How to create pivot table from web query

S

Smugliy

Hi ,PLEASE help me to create programmaticly pivot table from web query

My code for creating table query :
Excel.Worksheet ws = new Excel.WorksheetClass();
string strCellAddress =
applicationObject.ActiveCell.get_Address(1, 1, Excel.XlReferenceStyle.xlA1,
System.Type.Missing, System.Type.Missing);
ws =
(Excel.Worksheet)applicationObject.ActiveWorkbook.ActiveSheet;
object async = false;

Excel.Range rngDestination =
applicationObject.get_Range(strCellAddress, System.Type.Missing);
object connection = "URL;http://someUrlHere...";
Excel.QueryTable tblQuery = ws.QueryTables.Add(connection,
rngDestination, System.Type.Missing);
tblQuery.BackgroundQuery = true;
tblQuery.TablesOnlyFromHTML = true;
tblQuery.Refresh(async);
tblQuery.SaveData = true;


this code is fill excel with data .And I want to create from it pivot table
without filling excel with data.Is it possible?

help me please,

smugliy
 

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

Top