By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,694 Members | 1,288 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,694 IT Pros & Developers. It's quick & easy.

datagrid to excel

P: n/a
RTT
hey,

i made a windows form where i created a datagrid with a datatable as it's
datasource. now i want to supplie a save button to my users so the datagrid
can be exported to excel. how can i do this?

thxs
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

http://support.microsoft.com/kb/319180/EN-US/

http://support.microsoft.com/default...b;en-us;306022

Ken
-------------------
"RTT" <RT*@pandora.be> wrote in message
news:ef**************@tk2msftngp13.phx.gbl...
hey,

i made a windows form where i created a datagrid with a datatable as it's
datasource. now i want to supplie a save button to my users so the datagrid
can be exported to excel. how can i do this?

thxs

Nov 21 '05 #2

P: n/a
RTT
I'm using windows 2000 with excel 2000 SP3, i import the microsoft office
9.0 object library. But when i use your code i receive the error
"System.Runtime.InteropServices.COMException (0x80028018): Old format or
invalid type library." at those line like:
oExcelWorkbooks.Add()
i try almost everything i found at
http://support.microsoft.com/kb/319180/EN-US/

http://support.microsoft.com/default...b;en-us;306022

seems like they al use 10.0 object library, but i only have the 9. isn't
theire any simple solution to import my datatable or may datagrid to excel?
i think i try almost everything. :s

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uS**************@TK2MSFTNGP14.phx.gbl...
Hi,

http://support.microsoft.com/kb/319180/EN-US/

http://support.microsoft.com/default...b;en-us;306022

Ken
-------------------
"RTT" <RT*@pandora.be> wrote in message
news:ef**************@tk2msftngp13.phx.gbl...
hey,

i made a windows form where i created a datagrid with a datatable as it's
datasource. now i want to supplie a save button to my users so the datagrid can be exported to excel. how can i do this?

thxs

Nov 21 '05 #3

P: n/a
RTT
found solution to my problem:
http://msdn.microsoft.com/library/de..._VSTMultCR.asp
"RTT" <RT*@pandora.be> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I'm using windows 2000 with excel 2000 SP3, i import the microsoft office
9.0 object library. But when i use your code i receive the error
"System.Runtime.InteropServices.COMException (0x80028018): Old format or
invalid type library." at those line like:
oExcelWorkbooks.Add()
i try almost everything i found at
http://support.microsoft.com/kb/319180/EN-US/

http://support.microsoft.com/default...b;en-us;306022

seems like they al use 10.0 object library, but i only have the 9. isn't
theire any simple solution to import my datatable or may datagrid to excel? i think i try almost everything. :s

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:uS**************@TK2MSFTNGP14.phx.gbl...
Hi,

http://support.microsoft.com/kb/319180/EN-US/

http://support.microsoft.com/default...b;en-us;306022

Ken
-------------------
"RTT" <RT*@pandora.be> wrote in message
news:ef**************@tk2msftngp13.phx.gbl...
hey,

i made a windows form where i created a datagrid with a datatable as it's datasource. now i want to supplie a save button to my users so the

datagrid
can be exported to excel. how can i do this?

thxs


Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.