Export ms-access tables information to excel using ASP Code

G

Gaffar

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.
 
R

Ray Costanzo [MVP]

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
 
S

sridevi

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
 
R

Ray Costanzo [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top