Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Export ms-access tables information to excel using ASP Code

Reply
Thread Tools

Export ms-access tables information to excel using ASP Code

 
 
Gaffar
Guest
Posts: n/a
 
      05-09-2005
Hello,

how to export ms-access tables information to excel sheet using ASP. please
give sample code.

it is very urgent to me or if u have no idea please give any news group to
solve my question's answer.

Thanks in advance.
Gaffar.


 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      05-09-2005
Dim oADO : Set oADO = CreateObject("ADODB.Connection")
oADO.Open "your connection string"
Set oRS = oADO.Execute("SELECT stuff FROM table")
If Not oRS.EOF Then sCSV = oRS.GetString(,,",",vbCrLf)
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile("C:\Path\file.csv")
oFile.Write sCSV
oFile.Close : Set oFile = Nothing
Set oFSO = Nothing

Ray at work

"Gaffar" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello,
>
> how to export ms-access tables information to excel sheet using ASP.

please
> give sample code.
>
> it is very urgent to me or if u have no idea please give any news group to
> solve my question's answer.
>
> Thanks in advance.
> Gaffar.
>
>



 
Reply With Quote
 
 
 
 
sridevi
Guest
Posts: n/a
 
      05-10-2005
Hello
good morning thanks for your reply. the code which you have sent is working
for a single worksheet. but our requirement is to export the datat to
multiple worksheets.
Please help the code. waiting for your reply.

Regards
gaffar & sreedevi

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:(E-Mail Removed)...
> Dim oADO : Set oADO = CreateObject("ADODB.Connection")
> oADO.Open "your connection string"
> Set oRS = oADO.Execute("SELECT stuff FROM table")
> If Not oRS.EOF Then sCSV = oRS.GetString(,,",",vbCrLf)
> oRS.Close : Set oRS = Nothing
> oADO.Close : Set oADO = Nothing
>
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> Set oFile = oFSO.CreateTextFile("C:\Path\file.csv")
> oFile.Write sCSV
> oFile.Close : Set oFile = Nothing
> Set oFSO = Nothing
>
> Ray at work
>
> "Gaffar" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hello,
> >
> > how to export ms-access tables information to excel sheet using ASP.

> please
> > give sample code.
> >
> > it is very urgent to me or if u have no idea please give any news group

to
> > solve my question's answer.
> >
> > Thanks in advance.
> > Gaffar.
> >
> >

>
>



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      05-10-2005
I think you should look into using a technology that is not ASP then. Excel
automation. Have Excel import data from a database. See
microsoft.public.excel.programming, for example.

Ray at work

"sridevi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello
> good morning thanks for your reply. the code which you have sent is

working
> for a single worksheet. but our requirement is to export the datat to
> multiple worksheets.
> Please help the code. waiting for your reply.
>
> Regards
> gaffar & sreedevi
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
> message news:(E-Mail Removed)...
> > Dim oADO : Set oADO = CreateObject("ADODB.Connection")
> > oADO.Open "your connection string"
> > Set oRS = oADO.Execute("SELECT stuff FROM table")
> > If Not oRS.EOF Then sCSV = oRS.GetString(,,",",vbCrLf)
> > oRS.Close : Set oRS = Nothing
> > oADO.Close : Set oADO = Nothing
> >
> > Set oFSO = CreateObject("Scripting.FileSystemObject")
> > Set oFile = oFSO.CreateTextFile("C:\Path\file.csv")
> > oFile.Write sCSV
> > oFile.Close : Set oFile = Nothing
> > Set oFSO = Nothing
> >
> > Ray at work
> >
> > "Gaffar" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > Hello,
> > >
> > > how to export ms-access tables information to excel sheet using ASP.

> > please
> > > give sample code.
> > >
> > > it is very urgent to me or if u have no idea please give any news

group
> to
> > > solve my question's answer.
> > >
> > > Thanks in advance.
> > > Gaffar.
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export to Excel (Default File Type - Excel) =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?= ASP .Net 15 05-21-2009 12:01 PM
Export to excel in asp.net using excel template Grey ASP .Net 4 10-17-2007 08:08 AM
How to get database metadata information (i.e. existing tables and columns in tables) Chris Brat Python 5 08-22-2006 05:25 PM
using Microsoft Excel image for Export to Excel button =?Utf-8?B?U3JpZGhhcg==?= ASP .Net 0 12-09-2005 08:58 PM
Code in ASP to export to Excel - works & doesn't work??? Help! ASP .Net 1 03-04-2004 10:16 PM



Advertisments