SQL Server Query to Excel

Giganews Newsgroups
Subject: SQL Server Query to Excel
Posted by:  Doctorjones_md (xxxDoctorjones_mdx…@xxxyahoo.com)
Date: Mon, 12 Feb 2007

Is there an easy way to accomplish the following?

Over the past 6 months I have made modification to an Excel Workbook that
resides on the File Server.  I have added Field Names in the Final Version
(which coincide with Field Names on SQL Server) that don't exist in earlier
version of the Excel Workbook.  Unfortunately, many users have copied the
Master Workbook from the File Server down to their C Drive, and now the VBA
code doesn't roll up the data correctly to SQL Server.

Here's that I'd like to be able to do -- is there an easy way to have SQL
Server query Excel and check to see if a specified version is being used
(say I have a worksheet named "version", and the latest version is use is
2007_02_08_07), and pop a Message  Box to notify the user of an incorrect
version.

How would I go about doing this?

Thanks in advance for any help with this one.

Replies