no of rows one excel sheet could accomodate
Plz any one help me in this regard ...
I need to save data from my SQL server table to en excel file ... Now i need to know how many records could be accomodated in one worksheet ... If records get more than 1 sheet will it automatically move to 2nd work sheet or we have to control it manually.
Re: no of rows one excel sheet could accomodate
The number of rows an Excel sheet can hold is hardly a C# question. You should go to MSDN and read about Excel and the capabilities of each version. As for whether anything will automatically go to the next sheet, no matter how you're interacting with Excel you always specify the worksheet so if you want to change worksheets you have to specify the new one.
Re: no of rows one excel sheet could accomodate
Excel can hold 65,535 rows on a single sheet.
How are you exporting the SQL data?
Re: no of rows one excel sheet could accomodate
thnx rob .. m just extracting data from table to a dataset and then thru data set export all rows to an excel file
Re: no of rows one excel sheet could accomodate
As I said, when you interact with an Excel sheet you have to specify which sheet it is. If you're using ADO.NET then you use the sheet name as the table name in your SQL code. If you specify the name of a sheet that has too many rows then ADO.NET won't simply ignore your sheet specification and arbitrarily put the data into another worksheet. It will throw an exception.
Re: no of rows one excel sheet could accomodate
Well that is why you would want to keep track of the number of records.