2 Replies - 1946 Views - Last Post: 21 October 2012 - 09:37 PM Rate Topic: -----

#1 sanjay5219  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-October 12

Excel File Upload with Multiple Sheet

Posted 21 October 2012 - 02:05 AM

Hi All,

I have to create a VB.Net Module where user will upload excel file in one table and excel file is having multiple sheet and all have to insert in one table.
Is This A Good Question/Topic? 0
  • +

Replies To: Excel File Upload with Multiple Sheet

#2 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: Excel File Upload with Multiple Sheet

Posted 21 October 2012 - 05:44 AM

This might be a good first step
Was This Post Helpful? 0
  • +
  • -

#3 EterS  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-October 12

Re: Excel File Upload with Multiple Sheet

Posted 21 October 2012 - 09:37 PM

Do you mean to export Exel to a DataTable?

If so, I hope my code can help you.

			Dim workbook As New Workbook()

			workbook.LoadFromFile("C:\Simple.xls")
			Dim sheet As Worksheet = workbook.Worksheets(0)

			Dim dataTable As DataTable = sheet.ExportDataTable()
			Me.dataGridView1.DataSource = dataTable


I use a VB .NET Excel Library
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1