Export to Excel query

Discussion in 'ASP General' started by Simon Gare, Jan 5, 2007.

  1. Simon Gare

    Simon Gare Guest

    Hi have succesfully exported data from db to excel and dynamically generated
    filename, problem is I need a space between the invoice ID and Customer
    name, at present it generates the data but joined together eg 311Mackenzie
    Centre should read 311 Mackenzie Centre

    <%
    sData = (request.querystring("InvoiceID")) +
    (Customers.Fields.Item("CompanyName").Value)
    Response.AddHeader "Content-Disposition","attachment; filename=" + sData
    Response.ContentType = "application/vnd.ms-excel"
    %>

    Anyone help?

    Regards
    Simon Gare
    The Gare Group Limited

    website: www.thegaregroup.co.uk
    website: www.privatehiresolutions.co.uk
    Simon Gare, Jan 5, 2007
    #1
    1. Advertising

  2. Simon Gare

    Mark Schupp Guest

    sData = (request.querystring("InvoiceID")) + " " +
    (Customers.Fields.Item("CompanyName").Value)

    --
    --Mark Schupp


    "Simon Gare" <> wrote in message
    news:...
    > Hi have succesfully exported data from db to excel and dynamically
    > generated
    > filename, problem is I need a space between the invoice ID and Customer
    > name, at present it generates the data but joined together eg
    > 311Mackenzie
    > Centre should read 311 Mackenzie Centre
    >
    > <%
    > sData = (request.querystring("InvoiceID")) +
    > (Customers.Fields.Item("CompanyName").Value)
    > Response.AddHeader "Content-Disposition","attachment; filename=" + sData
    > Response.ContentType = "application/vnd.ms-excel"
    > %>
    >
    > Anyone help?
    >
    > Regards
    > Simon Gare
    > The Gare Group Limited
    >
    > website: www.thegaregroup.co.uk
    > website: www.privatehiresolutions.co.uk
    >
    >
    Mark Schupp, Jan 5, 2007
    #2
    1. Advertising

  3. Simon Gare

    Simon Gare Guest

    Thanks Mark worked perfectly

    Simon

    "Mark Schupp" <> wrote in message
    news:uy%...
    >
    > sData = (request.querystring("InvoiceID")) + " " +
    > (Customers.Fields.Item("CompanyName").Value)
    >
    > --
    > --Mark Schupp
    >
    >
    > "Simon Gare" <> wrote in message
    > news:...
    > > Hi have succesfully exported data from db to excel and dynamically
    > > generated
    > > filename, problem is I need a space between the invoice ID and Customer
    > > name, at present it generates the data but joined together eg
    > > 311Mackenzie
    > > Centre should read 311 Mackenzie Centre
    > >
    > > <%
    > > sData = (request.querystring("InvoiceID")) +
    > > (Customers.Fields.Item("CompanyName").Value)
    > > Response.AddHeader "Content-Disposition","attachment; filename=" +

    sData
    > > Response.ContentType = "application/vnd.ms-excel"
    > > %>
    > >
    > > Anyone help?
    > >
    > > Regards
    > > Simon Gare
    > > The Gare Group Limited
    > >
    > > website: www.thegaregroup.co.uk
    > > website: www.privatehiresolutions.co.uk
    > >
    > >

    >
    >
    Simon Gare, Jan 5, 2007
    #3
    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. S. Justin Gengo

    export sql query results to Excel

    S. Justin Gengo, Nov 6, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    37,926
  2. Replies:
    2
    Views:
    1,370
    =?Utf-8?B?U3RldmUgQy4gT3Jy?=
    Feb 15, 2006
  3. IluDeR
    Replies:
    0
    Views:
    247
    IluDeR
    Jan 21, 2004
  4. IluDeR
    Replies:
    0
    Views:
    238
    IluDeR
    Jan 21, 2004
  5. Andy

    Query database, then export to Excel VB.NET

    Andy, May 11, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    634
    Andy Bolk
    May 14, 2004
Loading...

Share This Page