c# - Load a Power Pivot data model in a VSTO Excel application -
i have excel document-level customisation (vsto, c# - not add-in) whereby user can dynamically retrieve data sql server database. right place results on worksheet, there more million rows. know if it's possible load data power pivot data model?
here vba equivalent blogged dany hoter. should pattern follow in c#:
sub addsqltables() ‘one or more tables sql server database ‘relationships detected if declared in database activeworkbook.connections.add2 _ “connection name”, “”, _ “oledb;provider=sqloledb.1;integrated security=sspi;persist security info=true;data source=<sql server – name>;use procedure prepare=1;auto translate=true;packet size=4096;use encryption data=false;tag column collation when possible=false;initial catalog=adventureworksdw2008r2” _ , “””dimcustomer””,””dimgeography”””, 6, true, true end sub
Comments
Post a Comment