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.

SpreadsheetControl in WPF takes 2-3 seconds to initialize

Thread ID:

Created:

Updated:

Platform:

Replies:

120238 Sep 13,2015 04:59 AM Sep 17,2015 06:08 AM WPF 6
loading
Tags: SpreadsheetControl(Classic)
Belikov
Asked On September 13, 2015 04:59 AM

We want to use it to preview excel files in our application. Unfortunately, if we create control dynamically it takes about 2-3 seconds to create and UI is stuck, because we have to use the same thread.

You can easily test it:
            Stopwatch sw = new Stopwatch();
            sw.Start();
            SpreadsheetControl c = new SpreadsheetControl();
            MessageBox.Show(sw.ElapsedMilliseconds.ToString());

Is there any way to make it faster?

We can create a control at the startup time, but this will increase startup time to 2-3 seconds. Our project is a Word add-in and initialization happens when user clicks button in ribbon, so such a big delay is unacceptable.


Kanimozhi Bharathi [Syncfusion]
Replied On September 14, 2015 12:41 PM

Hi Belikov,
Thank you for contacting Syncfusion Support.
We recommend you to use the new control SfSpreadsheet for high performance and better stability. Since we moved the old Spreadsheet Control to Classic.
The SfSpreadsheet is an Excel inspired control that allows you to create, edit, view and format the Microsoft excel files without Excel installed. It provides absolute ease of use UI experience with integrated ribbon.
Please find the attached sample which satisfies your requirement which takes less than 1 sec for loading the UI.
Sample link: http://www.syncfusion.com/downloads/support/forum/120238/ze/CS672036849
UG Link: http://www.syncfusion.com/downloads/support/forum/120238/ze/Spreadsheet-1173131472
Please let us know if you have any query.
Thanks
Kanimozhi B

Belikov
Replied On September 15, 2015 03:04 AM

Does this control allows copying of the cells and, if it does, do the cells copy together with the formulas?
Can ribbon be hidden? We use this control to quickly preview a document and copy data from there.

Belikov
Replied On September 16, 2015 04:32 AM

I tested SfSpreasheet. It is a bit faster, but still rather slow.
Another issue is that sometimes it throws System.Collections.Generic.KeyNotFoundException when I try to open the document. It happens with the same simple document (attached), so it is not related to document somehow.

Attachment: Test_de20936f.zip

Kanimozhi Bharathi [Syncfusion]
Replied On September 16, 2015 07:34 AM

Hi Belikov,

Please find the details below,



QUERY
RESPONSE
Does this control allows copying of the cells and, if it does, do the cells copy together with the formulas?
Can ribbon be hidden? We use this control to quickly preview a document and copy data from there.

We have analyzed your query. SfSpreadsheet allows you to copy the data along with formulas and you can also create SfSpreadsheet control separately without using SfSpreadsheet Ribbon.
it throws System.Collections.Generic.KeyNotFoundException when I try to open the document. It happens with the same simple document (attached), so it is not related to document somehow.

We are unable to reproduce the issue while importing the attached excel file with our sample. Can you please modify the sample to reproduce the issue along with the replication procedure? You can download the sample from the link below:

Link:

http://www.syncfusion.com/downloads/support/forum/120238/ze/CS_(2)-220613842

Please
 provide us the stack trace details of the issue to analyze further and provide a better solution.




Please let us know if you have any other query.

Thanks
Kanimozhi B



Belikov
Replied On September 16, 2015 07:36 AM

I found what caused System.Collections.Generic.KeyNotFoundException. 
It happen when I try to create control and open document immediately in the same method. It seems that it need some time to initialize...

Jai Ganesh S [Syncfusion]
Replied On September 17, 2015 06:08 AM

Hi Belikov,


We are able to reproduce the issue and a support incident to track the status of this query has been created under your account. Please log on to our support website to check for further updates


https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents


Please let me know if you have any questions.


Thank you,

Jai Ganesh S


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.

;