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

AddCopy a spreadsheet into a currently active control, but cannot invalidate

Hi, I'm a first time user in Spreadsheet control. I wanted to do the following task;
1. read an excel file, copy its first sheet,
2. add it to currently active winform spreadsheet

I've done the first with XlsIO control, successfully get the first worksheet, and in my debug console, everything seems fine.
I then do the following (for the reference, I added the code into the form's OnLoad handler)

(let's say, my control is Spreadsheet myControl, my pickedup file was IWorksheet mySheet; )

myControl.Workbook.ActiveSheetIndex = 1;

Then now, on the debug console, everything looks fine. On the other hand, on UI, nothing happend.
Even worse, right clicking on the sheet will trigger null reference.

I then realize I need to invalidate the control to make it redraw. However, all my tries:

does not seem to make it work either.

My question is, 1. is it possible? 2. is there a better and recommended approach?

Thanks in advance.

Best wishes

1 Reply

JP Jagadeesan Pichaimuthu Syncfusion Team May 27, 2019 01:14 PM UTC

Hi Junsoo, 
Thanks for using Syncfusion product. 
We are currently validating the reported problem in our end, so we will update you the more details on May 29th, 2019. 
We appreciate your patience until then. 

Live Chat Icon For mobile
Up arrow icon