Click here to Skip to main content
11,711,220 members (83,020 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows Forms
How to upload excel files in windows foms using c#
Posted 11-Feb-13 0:22am
Comments
Maciej Los at 11-Feb-13 6:26am
   
What have you done so far?
Do you want to display uploaded data?
devchina at 11-Feb-13 8:25am
   
after uploading excel(web apll we can upload files using fileupload control but how to upload excel files in win forms) file i want to maintain that data in datatable to access anywhere in my application
Pete O'Hanlon at 11-Feb-13 7:08am
   
Upload them to where? A web site? An FTP site? A server your application has access to?
devchina at 11-Feb-13 8:25am
   
after uploading excel(web apll we can upload files using fileupload control but how to upload excel files in win forms) file i want to maintain that data in datatable to access anywhere in my application
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Steps to do:
1) create new project (windows application),
2) add DataGridView control to your Form,
3) use OleDbConnection[^], OleDbCommand[^] to get data from Excel; to build correct connectionstring, see here: http://www.connectionstrings.com/[^]
4) use DataTable[^] as a source of your DataGridView.DataSource[^].
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

If you want to work with Excel files in WinForms you can use this .NET Excel Reader[^] to export data from excel files or this .Net Excel Writer[^] to read/write/create xls, xlsx, csv files.
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 549
1 OriginalGriff 255
2 Peter Leow 154
3 Maciej Los 120
4 Abhinav S 120
0 Maciej Los 95
1 Richard MacCutchan 90
2 Abhinav S 90
3 OriginalGriff 80
4 Member 4653839 50


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2015
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