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
close icon

Query timout expired in worksheet.ListObjects

Dear Sir/Mam

We are using XlsIO Module for bulk data export using worksheet.ListObjects and QueryTables.

But we are facing a problem in this module.

When our query or store procedure take more time execute then after 30-50 second of Calling 

ws.ListObjects[0].Refresh(); function then a error is showing front on us "Query timeout expired" 

.We need this functionality on urgent basis.

Please help us to resolve this issue.

We are attaching code snippiest. Please guide us. We hides connection of our DB Server string in this code

3 Replies

KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team March 14, 2023 10:56 AM UTC

Hi Nagendra,

We suspect there might be an issue with the connection string and properties. We request you to load the data into Microsoft Excel using the same connection string and properties and confirm us if this works fine.


NG Nagendra Gupta March 17, 2023 04:58 AM UTC

Dear Syncfusion Team

First of all, I request you to rectify your procrastination habit.

In the "ListObject.QueryTable" solution given by you, OLEDB connection and OLEDB command have been used.

Everything is fine. You have also given ConnectTimeout property in your OleDb ConnectionString. The property  CommandType and  CommandText has also been given, but how can you forget CommandTimout property of OledbCommand. The default OledbCommand.CommandTimout is 30 seconds.

Neither did you make any changes in the CommandTimeout nor did you give any provision to change it by the user.

Why ???

To know whether my work is being done by CommandTimout property or not, I did a research which you will see below

Error Snapshot 

Solution Snapshot

Here you can see execution of filling a datable is done by setting CommandTimout = 0

Now Please give us a provision for setting CommandTimout in ListObject.QueryTable

I hope you have understood what I want to tell you.

And this time you won't avoid me

Thanks with Regards

Nagendra Gupta


KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team March 17, 2023 02:27 PM UTC

Hi Nagendra,

We are sorry for the delay in getting back to you. 

We have prepared a custom NuGet in the version to overcome the reported issue and attached it here for your reference. We request you to try this and let us know if this helps.


Attachment: syncfusion.xlsio.aspnet.mvc5.

Live Chat Icon For mobile
Up arrow icon