vsto - C# refresh Power Pivot Query Excel -


i have done quite extensive research , have been unable find answer anywhere.

so summarise, have vsto workbook number of queries feeding power pivot , refresh data.... cannot use refreshall queries need refreshing @ times.

i have done in vba , when try following code in c# com exception

 //defining excel objects         excel.application xlapp = globals.thisworkbook.application;         excel.workbook workbook = xlapp.activeworkbook;         excel.sheets sheets = workbook.worksheets;          //refreshing connections         foreach (excel.workbookconnection con in workbook.connections)         {             if (con.name!="query - cmc's")             {                 con.refresh();             }          } 

please can me? cannot find api's power query, know case in 2012 cannot find have updated since.

thanks help.

joe


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -