1, FarPoint only support WinForm, in WPF to reference: WindowsFormsIntegration.dll
2. *.xaml File Reference
XMLNS:WFI = "Clr-namespace:system.windows.forms.integration;assembly=windowsformsintegration"
Xmlns:farpoint= "Clr-namespace:farpoint.win.spread;assembly=farpoint.win.spread"
--
<wfi:windowsformshost name= "WindowsFormsHost1" >
<farpoint:fpspread x:name= "Fitnessspread"/>
</wfi:WindowsFormsHost>
3, the background load Excel template,
Private voidLoadfarpoint () {Fitnessspread.openexcel (System.Environment.CurrentDirectory+@"\datatemplates\farpoint.xlsx"); FitnessSpread.ActiveSheet.OperationMode=FarPoint.Win.Spread.OperationMode.ReadOnly; Fitnessspread.tabstripinserttab=false; Fitnessspread.tabstrippolicy=FarPoint.Win.Spread.TabStripPolicy.Never; FitnessSpread.ActiveSheet.ColumnHeaderVisible=false; FitnessSpread.ActiveSheet.RowHeaderVisible=false; FitnessSpread.ActiveSheet.RowCount= in; FitnessSpread.ActiveSheet.ColumnCount=7; fitnessspread.activesheet.cells[0,0]. Text ="background code to fill in! "; fitnessspread.activesheet.cells[3,0]. Text ="Oh , whoa! "; }
WPF displays Excel through Farpoint