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. Image for the cookie policy date

Exception when cut/copy/paste cells between different spreadsheets

Video repro shown.   (attached in zip file) 

Scenario
Data loaded into 2 spreadsheets, Copy cells from one and paste into the other.
1st copy/paste succeeds without a problem.
2nd copy/paste results in unhandled exception.

It is not the data as I if reverse the data i'm copying in 1st action with the data in the 2nd action - the 1st will copy and the 2nd will still fail.

Call Stack
System.ArgumentException
  HResult=0x80070057
  Message=Sheet Name is already existed in workbook
  Source=Syncfusion.XlsIO.Base
  StackTrace:
   at Syncfusion.XlsIO.Implementation.Collections.WorkbookObjectsCollection.Add(ISerializableNamedObject namedObject)
   at Syncfusion.XlsIO.Implementation.Collections.WorksheetsCollection.Add(IWorksheet sheet)
   at Syncfusion.XlsIO.Implementation.Collections.WorksheetsCollection.Create(String name)
   at Syncfusion.Windows.Forms.Spreadsheet.SpreadsheetCopyPaste.Paste(GridRangeInfoList range, PasteOptions e)
   at Syncfusion.Windows.Forms.Spreadsheet.SpreadsheetCopyPaste.Paste(GridRangeInfoList range)
   at Syncfusion.Windows.Forms.Spreadsheet.SpreadsheetCopyPaste.Paste()
   at Syncfusion.Windows.Forms.CellGrid.SelectionController.HandleKeyDown(KeyEventArgs args)
   at Syncfusion.Windows.Forms.Spreadsheet.SpreadsheetGrid.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
   at Syncfusion.Windows.Forms.Spreadsheet.SpreadsheetGrid.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   at ExcelDisplay.My.MyApplication.Main(String[] Args) in :line 81




Attachment: capture3_92fa2296.zip

11 Replies

MG Mohanraj Gunasekaran Syncfusion Team February 20, 2019 08:12 AM

Hi Spotty, 

Thanks for using Syncfusion product. 

We have tried to reproduce your scenario using below attached sample in our latest Syncfusion product version 16.4.0.52. But the sample is working fine as we expected. We suspect that this issue may occur based on your customization. So, if it is possible please provide your all spreadsheet related settings. It will be helpful us to provide the solution at the earliest. Please find the below tested video demo. 


Regards, 
Mohanraj G 



SP Spotty February 20, 2019 11:26 AM

Attached is the destination spreadsheet which is being pasted into.  The source spreadsheet was simply dropped onto from the toolbox.    I can recreate this with the application every time.   As I'm simply using Cut/Cut  Paste functionality this is nothing to do with my code but obviously the spreadsheets and formulas, styles may have a reason.    Sheet1 only exists in the source sheet as it was a default created spreadsheet.  The destination sheets do not include one called Sheet1.

If you still have problems recreating then please PM and I'll provide the project to you so you can repro.



Attachment: ManifestLoadOrder20190219_25e37256.zip


SP Spotty February 20, 2019 12:42 PM

The same problem does not occur when cut/Copy/paste from cells within the same spreadsheet.



AA Arulraj A Syncfusion Team February 21, 2019 07:03 AM

Hi Spotty, 

Thanks for your update. 

We have tested your provided excel sheet using previously provided application. But, Cut/Copy/Paste operations are working fine at our end. So, if it is possible please provide the sample application to reproduce your reported scenario. It will be helpful us to investigate further and easy to address your reported scenario. 

Regards, 
Arulraj A 



SP Spotty February 21, 2019 11:05 AM

As I had said please PM so I can provide a repro project.   This is material that I would not like to be made publicly available but would like to fix the problem.


AA Arulraj A Syncfusion Team February 22, 2019 11:45 AM

Hi Spotty,   

Thanks for the update. 

Please mail your sample to support@syncfusion.com. We will check and update you. 

Arulraj A 



SP Spotty February 22, 2019 07:32 PM

Sent email with link to project files.


SP Spotty February 25, 2019 09:47 AM

Ive removed links as the project was shared in a pm so as not to become public available.    Im incredibly disappointed that you then simply posted the link in the forums.

I consider this highly unprofessional.


SP Spotty February 25, 2019 07:41 PM

If you did not download the files from the links provided in the Private Email I can PM with a new location.


MG Mohanraj Gunasekaran Syncfusion Team February 25, 2019 10:52 PM

Hi Spotty, 

We regret for the inconvenience caused. 

We have deleted the our post from this public forum and previously we have downloaded your sample from your provided link. Also. we can reproduce your reported scenario from your provided sample. We suspect that this is a bug. So, we have forwarded this query to our development team. So, we will check and update the details on 27th February 2019. 

Regards, 
Mohanraj G 



MG Mohanraj Gunasekaran Syncfusion Team March 19, 2019 10:29 AM

Hi Spotty, 

Sorry for the delay 

The issue with " Exception when cut/copy/paste cells between different spreadsheets " has been fixed and the patch for this fix can be downloaded from the following location.

 
Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:

http://syncfusion.com/Installs/support/patch/16.4.0.42/1113341/F142785/SyncfusionPatch_16.4.0.42_1113341_3192019062656227_F142785.exe

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:

http://syncfusion.com/Installs/support/patch/16.4.0.42/1113341/F142785/SyncfusionPatch_16.4.0.42_1113341_3192019062656227_F142785.zip

Assembly Version: 16.4.0.42
Installation Directions :
This patch should replace the files “Syncfusion.Spreadsheet.Windows” under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.0
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\16.4.0.42\precompiledassemblies\16.4.0.42\4.0

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

Note :
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.

https://www.syncfusion.com/support/directtrac/patches

Disclaimer :
Please note that we have created this patch for version 16.4.0.42 specifically to resolve the following issue(s) reported in this/the forum(s). 142785

If you have received other patches for the same version for other products, please apply all patches in the order received.
This fix will be included in our 2019 Volume1 release.  

Regards,
Mohanraj G 



Loader.
Live Chat Icon For mobile
Up arrow icon