We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Moving a worksheet from one spreadsheet control to another.

Thread ID:





125944 Sep 13,2016 06:20 PM UTC Sep 14,2016 01:22 PM UTC WinForms 1
Tags: Spreadsheet
Travis Chambers
Asked On September 13, 2016 06:20 PM UTC

I would like to be able to have two spreadsheet controls on my form and open two separate excel docs into each spreadsheet control. I would then like to move one worksheet from the 2nd spreadsheet control into the 1st spreadsheet. Is this possible? Or is it possible to upload sheets from multiple excel files into one spreadsheetcontrol?

Thank you.

Pannir Selvam S [Syncfusion]
Replied On September 14, 2016 01:22 PM UTC

Hi Travis, 
Thanks for using Syncfusion product. 
Currently Spreadsheet do not have default support to move the worksheets between the Spreadsheet.  However, you can achieve your requirement by copying the worksheets from one workbook into another workbook using XlsIO and then import that workbook into Spreadsheet2 and remove the worksheet from Spreadsheet1 like below code snippet. 
Code snippet[C#]: 
var book = workbook2.Clone(); 
Please find the sample for this from below location. 
And also you can combine the worksheets from multiple Excel files into single workbook using XlsIO and import that workbook into the Spreadsheet. 
Code Snippet[C#]: 
var engine1 = new ExcelEngine(); 
var workbook1 = engine1.Excel.Workbooks.Open(@"../../Data/Book1.xlsx"); 
var workbook2 = engine1.Excel.Workbooks.Open(@"../../Data/Book2.xlsx"); 
//Add the Worksheets of workbook1 into the workbook2. 
Please let us know if you have any queries. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon