Click here to Skip to main content
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 424
1 Nirav Prabtani 298
2 OriginalGriff 199
3 _Amy 165
4 Maciej Los 145
0 OriginalGriff 7,755
1 Sergey Alexandrovich Kryukov 6,951
2 Maciej Los 3,994
3 Peter Leow 3,698
4 CHill60 2,742


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 19 Feb 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