Home All Groups Group Topic Archive Search About

Exporting data from a DataTable in format other than XML

Author
25 Feb 2006 9:43 PM
michael
Is there a simple way to export the data from a DataTable (or even better a
DataView) in a format other than XML? In particular, how about a simple way
to export and save data directly to a new .xls file. I guess that if I needed
to I could write a line at a time to a .txt file and create a tab delimited
file, but I'm lookin' for some method() or pre-written code snippet that will
export directly to an .xls file.

--
Michael Hockstein

Author
26 Feb 2006 2:19 AM
Elton W
Hi michael,

If it's web application, you can use bind dataview with a datagrid, then
export datagrid to excel:

http://www.c-sharpcorner.com/Code/2003/Sept/ExportASPNetDataGridToExcel.asp

HTH

Show quote
"michael" wrote:

> Is there a simple way to export the data from a DataTable (or even better a
> DataView) in a format other than XML? In particular, how about a simple way
> to export and save data directly to a new .xls file. I guess that if I needed
> to I could write a line at a time to a .txt file and create a tab delimited
> file, but I'm lookin' for some method() or pre-written code snippet that will
> export directly to an .xls file.
>
> --
> Michael Hockstein
Author
26 Feb 2006 3:40 AM
Val Mazur (MVP)
Hi,

I believe there is a lot of different articles about it on a Web. Google
gives pretty good results if you query "How to export DataTable into Excel".
I solved this issue creating component

--
Val Mazur
Microsoft MVP
http://xport.mvps.org


Show quote
"michael" <howlinghound@nospam.nospam> wrote in message
news:01054A43-C675-4869-BE06-75E7ED8C3840@microsoft.com...
> Is there a simple way to export the data from a DataTable (or even better
> a
> DataView) in a format other than XML? In particular, how about a simple
> way
> to export and save data directly to a new .xls file. I guess that if I
> needed
> to I could write a line at a time to a .txt file and create a tab
> delimited
> file, but I'm lookin' for some method() or pre-written code snippet that
> will
> export directly to an .xls file.
>
> --
> Michael Hockstein
Author
26 Feb 2006 5:00 PM
michael
Thanks Val. Went to xPort and will try the application. Seems priced fine for
the amount of work that it would save me. How does the licensing work?. Does
it make entry into licenses.licx(which I find problematic when versions  of
libraries change). Is source code available? Was it compiled for .NET 2.0?

Michael
--
Michael Hockstein


Show quote
"Val Mazur (MVP)" wrote:

> Hi,
>
> I believe there is a lot of different articles about it on a Web. Google
> gives pretty good results if you query "How to export DataTable into Excel".
> I solved this issue creating component
>
> --
> Val Mazur
> Microsoft MVP
> http://xport.mvps.org
>
>
> "michael" <howlinghound@nospam.nospam> wrote in message
> news:01054A43-C675-4869-BE06-75E7ED8C3840@microsoft.com...
> > Is there a simple way to export the data from a DataTable (or even better
> > a
> > DataView) in a format other than XML? In particular, how about a simple
> > way
> > to export and save data directly to a new .xls file. I guess that if I
> > needed
> > to I could write a line at a time to a .txt file and create a tab
> > delimited
> > file, but I'm lookin' for some method() or pre-written code snippet that
> > will
> > export directly to an .xls file.
> >
> > --
> > Michael Hockstein
>
>
>
Author
27 Feb 2006 12:42 AM
Val Mazur (MVP)
Michael,

I could help you online to answer questions, but if you are interested in a
component, then send me an e-mail and I will answer all your questions
offline.

--
Val Mazur
Microsoft MVP
http://xport.mvps.org


Show quote
"michael" <howlinghound@nospam.nospam> wrote in message
news:616E6092-EEE7-44CE-B428-B23A04CA176A@microsoft.com...
> Thanks Val. Went to xPort and will try the application. Seems priced fine
> for
> the amount of work that it would save me. How does the licensing work?.
> Does
> it make entry into licenses.licx(which I find problematic when versions
> of
> libraries change). Is source code available? Was it compiled for .NET 2.0?
>
> Michael
> --
> Michael Hockstein
>
>
> "Val Mazur (MVP)" wrote:
>
>> Hi,
>>
>> I believe there is a lot of different articles about it on a Web. Google
>> gives pretty good results if you query "How to export DataTable into
>> Excel".
>> I solved this issue creating component
>>
>> --
>> Val Mazur
>> Microsoft MVP
>> http://xport.mvps.org
>>
>>
>> "michael" <howlinghound@nospam.nospam> wrote in message
>> news:01054A43-C675-4869-BE06-75E7ED8C3840@microsoft.com...
>> > Is there a simple way to export the data from a DataTable (or even
>> > better
>> > a
>> > DataView) in a format other than XML? In particular, how about a simple
>> > way
>> > to export and save data directly to a new .xls file. I guess that if I
>> > needed
>> > to I could write a line at a time to a .txt file and create a tab
>> > delimited
>> > file, but I'm lookin' for some method() or pre-written code snippet
>> > that
>> > will
>> > export directly to an .xls file.
>> >
>> > --
>> > Michael Hockstein
>>
>>
>>

AddThis Social Bookmark Button