This is a migrated thread and some comments may be shown as answers.

Adding Multiple worksheet in single workbook using multithreading

5 Answers 251 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Anupkumar
Top achievements
Rank 1
Anupkumar asked on 28 Sep 2017, 09:20 AM

Hi,

Can we add multiple worksheet in a single workbook using multithreading? Or can we write single worksheet using multithreading?

5 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 02 Oct 2017, 09:43 AM
Hello Anupkumar,

Could you please elaborate a bit more on your question, and especially on the multithreading part? If you attempt to implement the possibility to modify the content of a certain Spreadsheet (its workbook) at the same time, you can achieve this by binding it to WebSockets or SingalR.

However, this is a not inbuilt functionality of the Spreadsheet. Such feature request is logged in our public uservoice portal and the above suggested implementation is also suggested there:

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/13753044-spreadsheet-editing-simultaneously

Hope this information helps.

Regards,
Nencho
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Anupkumar
Top achievements
Rank 1
answered on 03 Oct 2017, 06:02 AM

Hi,

 I am trying to write data to spreadsheet from a data table that has huge number of records. I tried to create multiple worksheet and using multithreading I wanted to write it simultaneously. So my question is can I write multiple worksheet simultaneously using threading and then add these worksheets to single workbook? Is it possible to make instance of worksheet rather than instance of workbook? If I am using different workbook to save the worksheet, able to achieve the multithreading but when using single workbook it is not possible because it goes in shared state.

0
Nencho
Telerik team
answered on 04 Oct 2017, 01:46 PM
Hello Anupkumar,

Thank you for the clarification. I am afraid, however, that the Spreadsheet does not provide this possibility of multithreading. As you had well observed the shared state permits such operations. In addition, simontanious creation of worksheet and then creating the workbook is also not possible, due to internal classes implementation in the source of the widget.

Regards,
Nencho
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Anupkumar
Top achievements
Rank 1
answered on 05 Oct 2017, 10:44 AM

Hi Nencho ,

I used Task parallel library(TPL) and using Parallel.Invoke method I am able to create different task and able to write multiple worksheets (almost) simultaneously. But the issue is with performance, It is taking around 3 mins for just 20000 rows with 67 columns.

 

Thanks,

Anup

0
Nencho
Telerik team
answered on 09 Oct 2017, 09:57 AM
Hello Anupkumar,

Having in mind the large amount of data that you aim to load in the widget, the operation will inevitably take some time. I can suggest you, however, to enable the batch mode of the spreadsheet, as suggested in the following documentation article:

https://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/sheet#methods-batch

sheet.batch(function() {
    for (var i = 0; i < 10; i += 2) {
        sheet.hideColumn(i);
        sheet.hideRow(i);
    }
}, {
    layout: true,
    recalc: false,
    filter: false
});


Regards,
Nencho
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Spreadsheet
Asked by
Anupkumar
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Anupkumar
Top achievements
Rank 1
Share this question
or