Export ms-access tables information to excel using ASP Code

Discussion in 'ASP General' started by Gaffar, May 9, 2005.

  1. Gaffar

    Gaffar Guest

    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.
     
    Gaffar, May 9, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:%...
    > 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.
    >
    >
     
    Ray Costanzo [MVP], May 9, 2005
    #2
    1. Advertising

  3. Gaffar

    sridevi Guest

    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:...
    > 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" <> wrote in message
    > news:%...
    > > 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.
    > >
    > >

    >
    >
     
    sridevi, May 10, 2005
    #3
  4. 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" <> wrote in message
    news:...
    > 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:...
    > > 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" <> wrote in message
    > > news:%...
    > > > 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.
    > > >
    > > >

    > >
    > >

    >
    >
     
    Ray Costanzo [MVP], May 10, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    1
    Views:
    601
    Guest
    Mar 4, 2004
  2. =?Utf-8?B?U3JpZGhhcg==?=

    using Microsoft Excel image for Export to Excel button

    =?Utf-8?B?U3JpZGhhcg==?=, Dec 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,120
    =?Utf-8?B?U3JpZGhhcg==?=
    Dec 9, 2005
  3. =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?=

    Export to Excel (Default File Type - Excel)

    =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?=, Apr 24, 2006, in forum: ASP .Net
    Replies:
    15
    Views:
    17,548
    syed hassan
    May 21, 2009
  4. Chris Brat
    Replies:
    5
    Views:
    700
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
  5. Grey
    Replies:
    4
    Views:
    2,012
    Mark Rae [MVP]
    Oct 17, 2007
Loading...

Share This Page