i have explained how to select a Excel file from the local system and load into data grid view In visual c# Using visual studio 2012 and for the source code do mail me to bharatpkblog@gmail.com
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
How to select a Excel file from the local system and load into data grid view In visual c# Using visual studio 2012
1.
2. Step 1 : Drag and drop three buttons , One
Openfiledilogue , one textbox and one Grid view from
toolbox
3. Step 2 : Align the tools and change the text in the
property window as the names shown in the picture
bellow .
4. Step 3: Double click on chose button and write thee code
to select the file from the local system .( in my project
name of the [chose] button is btn1, and click event is
btnbrowse_click )
5. Step 4: Double click on Load button and write the code to
load the file from the local system by picking the project
path from textbox1 .( in my project the [load] button name
is btn2, and click event is btn2_click and Datagridview
name is dataGridview1 ).
6. Step 5: Double click on exit button and write the code to
close project after executing . ( In my project [close]
button name is btn3, and click event is btn3_click ).
7. And the screen shots of the project during the execution
are shown bellow .
When you click on the choose button it will show a
window where you can select excel file from the local
system and path will be displayed in textbox1.
8. Write the sheet number in the textbox 2 and press on
load button excel sheet will load in to the Grid view .