5
Answers

Upload functionality

Hi, i am making a desktop application which will have a simply save data and will show it in a grid type of functionality ,but i want to apply upload excel functionality in it ,i am new to this C# winforms so if anybody can guide me on this or any examples will be really helpful.

Answers (5)

0
Photo of Ramesh Palanivel
NA 9.5k 138.7k 7y
HI Bhaskar,
 
Please refer this below URL for your reference,
 
http://www.c-sharpcorner.com/UploadFile/6b8651/read-excel-file-in-windows-application-using-C-Sharp/
 
Accepted
0
Photo of Ramesh Palanivel
NA 9.5k 138.7k 7y
Hi Baskar,
 
Can you share your screnn shot of error message 
0
Photo of Bhaskar Sharma
NA 12 166 7y

I am talking about the example on that URL , there it gives an exception on giving the name of sheet as the name of sheet becomes too long., so any solution for that

 
i.e OleDbDataAdapter oleAdpt = new OleDbDataAdapter("select * from [Sheet1$]", con);  
0
Photo of Ramesh Palanivel
NA 9.5k 138.7k 7y
Hi Baskar,
 
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item("Mention your sheet name")
//mention your excel sheet name
<span style="font-family: Roboto, sans-serif;"> </span>
0
Photo of Bhaskar Sharma
NA 12 166 7y

I have to upload a  specific sheet from a woorkbook how can i do that.