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.
Unfortunately, activation email could not send to your email. Please try again.

Data is not pasted on Destination sheet from source sheet in workbook using Range property of IWorksheet object

Thread ID:

Created:

Updated:

Platform:

Replies:

32020 Jul 20,2005 01:26 AM Jul 21,2005 03:32 AM Windows Forms 1
loading
Tags: XlsIO
nirav desai
Asked On July 20, 2005 01:26 AM

Hi Stephen, I''''ve been trying to copy data (90 rows) from source worksheet to destination worksheet in other workbook using Syncfusion tool version 3.2. I am using Range method of worksheet to copy and paste the data from source sheet to destination sheet.Below is the code: ExcelEngine vacEngine=new ExcelEngine(); IApplication vacApplication=vacEngine.Excel; vacApplication.Workbooks.Open("C:\\ExcelData\\VAC document.xls"); IWorkbooks m_objBooksVAC=vacApplication.Workbooks; IWorkbook m_objBookVAC = m_objBooksVAC[0]; // Create a sheets objects.` IWorksheets m_objSheetsVAC=m_objBookVAC.Worksheets; //Source sheet from where data is required to copy. IWorksheet m_objSheet_VACSource = m_objSheetsVAC["VAC & Total Return"]; //Destination sheet IWorksheet m_objSheet_VACDestination=m_Workbook.Worksheets["VAC & Total Return"]; sRange=o.DR_Range; iColSt=1; iColEnd=9; sRowSt =1; sRowEnd =100; m_objSheet_VACDestination.Range[sRowSt,iColSt,sRowEnd,iColEnd].Value2 = m_objSheet_VACSource.Range[sRowSt,iColSt,sRowEnd,iColEnd].Text; When I execute the above code it does not throw any error but data is not pasted to the destination sheet. Please let me know the solution for the same. Thanks, Nirav

Administrator [Syncfusion]
Replied On July 21, 2005 03:32 AM

Hi Nirav, I put together a sample based on your requirements. Please take a look at this sample and let me know if you have any questions. Copying Source Worksheet to Destination Worksheet_7581.zip Thank you for your Co-operation. Best Regards, Seetha. >Hi Stephen, > >I''''ve been trying to copy data (90 rows) from source worksheet to destination worksheet in other workbook using Syncfusion tool version 3.2. >I am using Range method of worksheet to copy and paste the data from source sheet to destination sheet.Below is the code: > >ExcelEngine vacEngine=new ExcelEngine(); >IApplication vacApplication=vacEngine.Excel; >vacApplication.Workbooks.Open("C:\\ExcelData\\VAC document.xls"); >IWorkbooks m_objBooksVAC=vacApplication.Workbooks; >IWorkbook m_objBookVAC = m_objBooksVAC[0]; > >// Create a sheets objects.` >IWorksheets m_objSheetsVAC=m_objBookVAC.Worksheets; >//Source sheet from where data is required to copy. >IWorksheet m_objSheet_VACSource = m_objSheetsVAC["VAC & Total Return"]; > > >//Destination sheet >IWorksheet m_objSheet_VACDestination=m_Workbook.Worksheets["VAC & Total Return"]; >sRange=o.DR_Range; >iColSt=1; >iColEnd=9; >sRowSt =1; >sRowEnd =100; >m_objSheet_VACDestination.Range[sRowSt,iColSt,sRowEnd,iColEnd].Value2 = m_objSheet_VACSource.Range[sRowSt,iColSt,sRowEnd,iColEnd].Text; > >When I execute the above code it does not throw any error but data is not pasted to the destination sheet. > >Please let me know the solution for the same. > >Thanks, >Nirav

CONFIRMATION

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.

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.

;