Add sql Column to Excel Document

  • Good afternoon
    i have a excel document.One of the columns is an account number.I want to add the branch of that account number (which is in sql 2012) as another column in excel document.It is fine to do it manually.But it needs to be done daily and i want to automate it.
    I have tried to use report server to read the excel and get the sql column,but I can not get the odbc to work to excel
    Any suggestions is welcome.
    Thank you

  • Janda Nel - Thursday, July 13, 2017 7:25 AM

    Good afternoon
    i have a excel document.One of the columns is an account number.I want to add the branch of that account number (which is in sql 2012) as another column in excel document.It is fine to do it manually.But it needs to be done daily and i want to automate it.
    I have tried to use report server to read the excel and get the sql column,but I can not get the odbc to work to excel
    Any suggestions is welcome.
    Thank you

    What's the source of the Excel file? If the source isn't SQL Server, a macro might also work.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • the excel .xls file is dropped in a shared folder every day and then I need to add the branch name and code to each line.

  • Janda Nel - Thursday, July 13, 2017 7:33 AM

    the excel .xls file is dropped in a shared folder every day and then I need to add the branch name and code to each line.

    Are the branch name and code already in the Excel file? Could you ask that those columns are added when creating the file?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

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

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