Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
Copy XamSpreadsheet programmatically
posted

I tried the below using XamSpreadsheet (version 19.2) but am getting a MissingMethodException (seems it is looking for LoadXLSXFunc).  Thought this would be pretty straightforward.  Any ideas what I am missing or improvements?

var ss = new XamSpreadsheet();
ss.Workbook.Worksheets[0].Rows[0].Cells[0].Value = "Test0";
ss.Workbook.Worksheets[0].Rows[0].Cells[1].Value = "Test1";
ss.Workbook.Worksheets[0].Rows[0].Cells[2].Value = "Test2";
ss.Workbook.Worksheets[0].Rows[1].Cells[0].Value = "TestA";
ss.Workbook.Worksheets[0].Rows[1].Cells[1].Value = "TestB";
ss.Workbook.Worksheets[0].Rows[1].Cells[2].Value = "TestC";
ss.ExecuteCommand(SpreadsheetCommandType.Copy, null);

Exception:


+ base {System.MissingMethodException: Method not found: 'System.Func`4<Infragistics.Documents.Excel.Workbook,System.IO.Stream,Infragistics.Documents.Excel.WorkbookLoadOptions,Infragistics.Documents.Core.WorkItem> Infragistics.Documents.Excel.Workbook.get_LoadXLSXFunc()'.
   at Infragistics.Controls.Grids.Core.WorkbookDataOnjectManager..ctor(Workbook workbook)
   at Infragistics.Controls.Grids.Core.Spreadsheet.CopyToClipboard(Boolean cut)
   at Infragistics.Controls.Grids.Core.Spreadsheet.ExecuteCommand(SpreadsheetCommandType command, Object commandParameter,           Object sourceElement,LongValue currentState)
   at Infragistics.Controls.Grids.XamSpreadsheet.ExecuteCommand(SpreadsheetCommandType command, Object parameter)