I have to export data from sql server 2005 to predefined (columns and rows )excel(.xlsx) format using script using ssis(Script Task) OR ANY SIMPLE Method

  • Database :Adventerworks

    Table 1: HumanResources.Department

    Table 2: HumanResources.Employee

    Here conditon is that the sheet of excel should be same as below:

    Template:

    Here data is coming from Table 1

    colA colB colC colD colE colF

    DepartmentID1

    Namesusan

    GroupNamehr

    ModifiedDate17/01/2010

    In the below data is coming from Table 2

    EmployeeIDNationalIDNumber ContactID LoginIDManagerID

    1122020202157de12

    223212121123ds43

    Something like:

  • well if you are using 32 bit you can create an excel linked server that you and then insert into

  • Another way that would work is to create a report with the data you need. Then you run the report via a command line specifying it should be rendered in Excel and giving the output file name.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply