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

Adding worksheets to currently active Excel workbook

Thread ID:





93042 Feb 19,2010 07:11 PM UTC Feb 23,2010 08:41 AM UTC WinForms 1
Tags: XlsIO
Administrator [Syncfusion]
Asked On February 19, 2010 07:11 PM UTC


I would like to add a worksheet (to which I have already added some data and a chart) to an already running instance of Excel with an already open workbook. My question is, how do I reference the correct workbook object to which to add the sheet. I would like to say something like

IWorksheet sheet = Application.ActiveWorkBook.Add;

But of course this is not allowed syntax.. Any help would be much appreciated, Thank you in advance

Geetha M [Syncfusion]
Replied On February 23, 2010 08:41 AM UTC

Hi Arnold,

Thank you for your interest in Syncfusion products.

It is possible to add a new worksheet to the existing workbook. Please refer to the code snippet given below.

IWorksheet destSheet = application.ActiveWorkbook.Worksheets.Create();

However, it you have the worksheet created and want to add, please check if the following code would work for you.

IWorksheet destSheet = application.ActiveWorkbook.Worksheets.AddCopy(sourceSheet);

Please try this and let me know if you have any questions.



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