Results 1 to 9 of 9

Thread: extracting data to excel

  1. #1
    Join Date
    Sep 2005
    Posts
    10

    extracting data to excel

    Hi ,
    How can i extract or export data into excel sheet from sql server 7.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Use dts on sql7.

  3. #3
    Join Date
    Sep 2005
    Posts
    10
    sorry, its sql server 6.5. Can you give the steps to use data transfer service

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    If you have SQL 7.0 and up anywhere then you can use DTS from there to pull data out of SQL 6.5 and export to Excel.

    Otherwise you will need to use BCP.

  5. #5
    Join Date
    Feb 2010
    Posts
    3
    Please eloborate your answers. there are Junior readers need more clearer idea. And how to BCP?

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    You can find details in sql books online.

  7. #7
    Join Date
    Feb 2010
    Posts
    3

    Adding Styles or colours in Excel sheet template using query

    Can we generate some colourful or customized excel sheet using sql query.Am using following query for testing.the code is working fine.
    How to add some styles in the generated excel sheet,

    EXEC sp_makewebtask
    @outputfile = 'd:\testing.xls',
    @query = 'Select * from Database..Table_Name',
    @colheaders =1,
    @FixedFont=0,@lastupdated=0,@resultstitle='First_N ame,Last_Name,Address from Table_Name'

    Regards

  8. #8
    Join Date
    Sep 2002
    Posts
    5,938
    It's nothing to do with sql.

  9. #9
    Join Date
    Jan 2010
    Posts
    37
    Not with SQL, but you can with something like VBA in Excel or VBA via a VBScript. There are plenty of examples in the SDK for VBA for Excel on MSDN.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •