Exemple #1
0
        private void export_Click(object sender, EventArgs e)
        {
            SaveFileDialog s_dialog = new SaveFileDialog();
            s_dialog.DefaultExt = ".xls";
            s_dialog.Filter = "Excel files (*.xls)|*.xls|All files (*.*)|*.*";
            s_dialog.ShowDialog();

            //slow method
            //this.WriteToExcelSpreadsheet(s_dialog.FileName,ds.Tables[0]);

            //my own class and methods for faster export
            ExportToExcel export = new ExportToExcel(s_dialog.FileName,ds);

            export.writeToExcel();

            // EXPORT TO MS EXCEL METHOD
        }