Click here to monitor SSC

Programming Excel with SQL T-SQL

Last post 04-24-2009, 4:16 PM by Phil Factor. 1 replies.
Sort Posts: Previous Next
  •  04-23-2009, 2:00 PM Post number 73237

    Programming Excel with SQL T-SQL

    Ok, so I've been through the Robyn Page and Phil Factor 'SQL Server Excel Workbench' to create a dynamic Excel Spreadsheet for our dealers to download and re-upload to us.

    However, I am having problems creating a Pivot Table on one of the Excel Sheets, and am curious if anyone has done this, and could perhaps point me in a direction to help resolve this.

    The Data fluctuates per workbook generated (done on the fly from a web page), but the columns never change, so my range stays the same.

    Thanks for the help.
  •  04-24-2009, 4:16 PM Post number 73253 in reply to post number 73237

    Re: Programming Excel with SQL T-SQL

    What problems are you getting? Basically, whenever I do a task like this I do it in VBA first and then, when it is working nicely,  convert this to TSQL using OLE automation. There are plenty of examples around of doing this in VBA. The only tricky bit is querying the data from the database and putting this in the cells, but we show you a way of doing this in the workbench. I've done one in the past, but sadly I don't have the code any more.
View as RSS news feed in XML