469,613 Members | 1,380 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

Export ms-access tables information to excel using ASP Code

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.
Jul 22 '05 #1
3 3419
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" <ga****@nannacomputers.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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.

Jul 22 '05 #2
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:ex**************@tk2msftngp13.phx.gbl...
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" <ga****@nannacomputers.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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.


Jul 22 '05 #3
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" <sr*****@nannacomputers.com> wrote in message
news:eF**************@TK2MSFTNGP14.phx.gbl...
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:ex**************@tk2msftngp13.phx.gbl...
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" <ga****@nannacomputers.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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.



Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Tom Gao | last post: by
205 posts views Thread by Jeremy Siek | last post: by
1 post views Thread by sb Luis | last post: by
3 posts views Thread by Robert Bogue [MVP] | last post: by
reply views Thread by Ted H | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.