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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

IWorkbook and IWorksheet multithreading

Thread ID:





117315 Sep 26,2014 04:29 AM UTC Sep 30,2014 01:18 PM UTC ASP.NET Web Forms (Classic) 1
Tags: XlsIO
Fuhai Li
Asked On September 26, 2014 04:29 AM UTC

Hey, I am trying to use parallel library to update cells content for a open IWorkbook, I use one thread for each IWorksheet inside the book, but always got error for index out of range issue which must be relative to the thread safe stuff. So I am wondering if multhreading support from syncfusion or not, if yes, can I get some sample code, my code piece like below:
 //iBook opened from byte array already

ExcelTemplateContainer excelTemplateContainer = ExcelDB.GetExcelTemplateContainerFromDatabase(defaultDBParamList, exTemplateID, isForClientDownload);
 var n = iBook.Worksheets.Count - 1;
 var options = new ParallelOptions() { MaxDegreeOfParallelism = 12 };
 Parallel.For(0, n, options, i =>
 IWorksheet xlWorkSheet = iBook.Worksheets[i];
 List xCellList = excelTemplateContainer.SheetCellsDictionary[xlWorkSheet.Name].ToList();
UpldateExcelsheetCellContent(xlWorkSheet, xCellList);
//the update method here
public static void UpldateExcelsheetCellContent(IWorksheet xlWorkSheet, List xCellList)
 foreach (ExcelCell xlcell in xCellList)
 IRange xlWorkBookCell = xlWorkSheet.Range[xlcell.CellNumber];
if ((xlcell.AccountID ?? 0) != 0 || !xlWorkBookCell.HasFormula)
 xlWorkBookCell.Value = xlcell.Text;


hope can get some information soon.

Sudha Ramachandran [Syncfusion]
Replied On September 30, 2014 01:18 PM UTC

Hi Fuhai,

Thank you for using Syncfusion products.

Currently XlsIO does not support Multi-threading. Please refer to the Direct-Trac incident 130159, created regarding this query, for further follow up.

Please let us know if you have any queries. 


Sudha R


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon