|
-
Jun 1st, 2005, 01:50 PM
#1
Thread Starter
PowerPoster
Extracting Data from SQL Server into a Spreadsheet
I am trying to extract about 5 records from a SQL Server table into a spreadsheet. Basically, I want a snapshot of a table showing it's field names and it's associated field values. I wish to be able to print out this data. What is the best way to do this?
Thanks,
Blake
-
Jun 2nd, 2005, 03:10 AM
#2
Re: Extracting Data from SQL Server into a Spreadsheet
open excel (blank sheet)
open a recordset of the data you want
loop through the field names and output to row 1, columns whichever
loop through records and put into cells under the columns
close recordset
Something like that.
Excel will allow you to record macros to look at. You can either use a reference or just create an object for the excel object.
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|