Articles in this section
Category / Section

Could XlsIO generate several Excel Files at the same time ?

1 min read

Yes. We provide support for generating multiple reports at a same time. This can be done through threads.

C#

Thread[] threads = new Thread[10];

ThreadStart threadStart = new ThreadStart(GenerateXLS);

for (int i = 0; i < 10; i++)

{

threads[ i ] = new Thread(threadStart);

threads[ i ].Start();

}

 static void GenerateXLS()

{

for (int i = 0; i < 10; i++)

{

int c = Interlocked.Increment(ref counter);

ExcelEngine excelEngine = new ExcelEngine();

IApplication application = excelEngine.Excel;

}

VB

Dim threads() As Thread = New Thread(9) {}

Dim threadStart As ThreadStart = New ThreadStart(AddressOf GenerateXLS)

For i As Integer = 0 To 9

threads(i) = New Thread(threadStart)

threads(i).Start()

Next i

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied