Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
First of all, thank you for your time in reading this question Smile | :)
Now, i have tried searching in google yet i don't understand the codes or my skills aren't sufficient.
My question is: How can i export my dataset "SADDatabaseDataSet" or my Database or my DataGridViews to my MS Excel 2007 through the use of a button click?(I am using Visual C# 2010)
and if possibile, in just 1 worksheet only.
Advanced Thank you to you my savior Big Grin | :-D
btw, my program has 2 functions, first is to input the needed data for each column, the other is to(what should be) check the current database that has been exported to excel
Posted 25-Mar-13 19:27pm
Edited 25-Mar-13 21:31pm
v2
Comments
PIEBALDconsult at 26-Mar-13 0:38am
   
I'd use Oledb. By "1 worksheet" do you mean one workbook (file)? Typically a worksheet holds one table (but it can have more with some effort).

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You have to check this article if you are using web application.
Export DataTable to Excel with Formatting in C#[^]
  Permalink  
Comments
James Medalla at 26-Mar-13 2:32am
   
i'm not using a web application, just Visual C# 2010 in creating an Information System ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Kornfeld Eliyahu Peter 275
1 Maciej Los 204
2 Sergey Alexandrovich Kryukov 200
3 King Fisher 185
4 OriginalGriff 183
0 OriginalGriff 6,223
1 DamithSL 4,724
2 Maciej Los 4,196
3 Kornfeld Eliyahu Peter 3,894
4 Sergey Alexandrovich Kryukov 3,496


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 26 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100