5 Replies - 3073 Views - Last Post: 17 May 2013 - 10:08 PM Rate Topic: -----

#1 sagarpathare   User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 11
  • Joined: 24-April 13

Export a Datatable from a Dataset to an Excel Sheet

Posted 17 May 2013 - 02:41 AM

Hello,
I want to export data in the datatable of a dataset as an excel sheet in vb.net
I have googled it but nothing worked for me.
I tried importing Imports Microsoft.Office.Interop.Excel and Imports Microsoft.Office.Interop
But still there is red underline under excel application and worksheet.
Please provide me full code as I have deleted my original code.
Any-any help will be the most Appreciated.
Thanks and Regards,
Sagar

Is This A Good Question/Topic? 0
  • +

Replies To: Export a Datatable from a Dataset to an Excel Sheet

#2 CharlieMay   User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1730
  • View blog
  • Posts: 5,708
  • Joined: 25-September 09

Re: Export a Datatable from a Dataset to an Excel Sheet

Posted 17 May 2013 - 03:54 AM

did you also go in and add a reference to the Microsoft Office Interop ##.# so that you can import it?

Project|Add Reference|Look for the Interop for your flavor of excel|Check it and OK out of the dialog.
Was This Post Helpful? 1
  • +
  • -

#3 x-logan   User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 88
  • Joined: 18-April 13

Re: Export a Datatable from a Dataset to an Excel Sheet

Posted 17 May 2013 - 04:07 AM

I think you are the best in this (vb.net) forum .. your post's are always amazing.
Was This Post Helpful? 1
  • +
  • -

#4 sagarpathare   User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 11
  • Joined: 24-April 13

Re: Export a Datatable from a Dataset to an Excel Sheet

Posted 17 May 2013 - 09:43 AM

View PostCharlieMay, on 17 May 2013 - 03:54 AM, said:

did you also go in and add a reference to the Microsoft Office Interop ##.# so that you can import it?

Project|Add Reference|Look for the Interop for your flavor of excel|Check it and OK out of the dialog.

Yes I have tried it.
If you have a working project, can you please send it to me?
[email protected]
Was This Post Helpful? -1
  • +
  • -

#5 CharlieMay   User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1730
  • View blog
  • Posts: 5,708
  • Joined: 25-September 09

Re: Export a Datatable from a Dataset to an Excel Sheet

Posted 17 May 2013 - 10:05 AM

Try this
Was This Post Helpful? 1
  • +
  • -

#6 sagarpathare   User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 11
  • Joined: 24-April 13

Re: Export a Datatable from a Dataset to an Excel Sheet

Posted 17 May 2013 - 10:08 PM

View PostCharlieMay, on 17 May 2013 - 10:05 AM, said:

Try this

I have gone through the code.
And will try to use it later after a few minutes.
Anyway, thank you very very very much for the help.
I am very grateful to you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1