Mar 13, 2006
I have a datagridview(DGV) which contains data based on a user selections from a pre-defined dataset
View 1 Replies
In point form:
User starts program
program builds datatable
user opens file and program read all data from file into the dataset.datatable
user defines the data they want to see
program displays datagrid based on dataset.datatable and user choices. (basically it displays the whole dataset and removes unwanted columns
I want to be able to export the datagrid to excel (not sure which method yet). I have tried the excelexporter component i found somewhere on the msdn forums (it exports the data to look exactly like the datagridview) but its painfully slow. It exports something in the region of 100 records per minute. Most of the time, the datagridview can contain anywhere from 3000-32,000 records. As such, at 100 records per minute, the excel generation can take updwards of 50minutes. Unacceptably slow for the purposes of the program.
What do people recommend as the best method to quickly dump the contents of a datagrid into excel. By quickly, im talking at the speed of about 10,000 records per minute. In all honesty, anything over 5000 records per minute will be fast enough, but the quicker the better!
Is there a way of creating a new dataset.datatable that is built of the contents of the datagridview and then building an excel sheet by connecting to the new dataset?
I would like to be able to export to Excel 2000-2003 at a minimum, but if i can do excel 97 as well it won't hurt.