Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-11-06 : 06:09:50
|
Hi guys,Ok.. I will probably get my head bitten off for posting this question here but I don't know where else to go for help on this one Anyway, here goes :I have a VIEW on a test database that I have created. What I am after is accessing the VIEW so that it is output to an Excel datasheet.Any advice, links, tutorials on how to do such a thing?BTW, the view contains the full set of data, but I want to be able to output both the full set of data on Excel as well as the summery of the data [by grouping the relevant columns]Please help!Thanks in advance.__________________Make love not war! |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-11-06 : 06:34:13
|
Could you use DTS with the view instead of a source table (or am I missing something) ?Damian |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-11-06 : 06:46:09
|
Ok, it had to come out.. I admit, I am a total Excel VBA n00b. What I am after is something like this :The spreadsheet would contain a cell where you enter the database name to connect to [easy bit]Then starting position say from A6, I list the names of the view(s) that I want to out put the results to the Excel spreadsheet. I then press the magic button and the VBA would connect to my target database and output the contents of the VIEW into a new datasheet.I will eventually have over a hundred VIEWS used for auditing purposes but I am only playing around with this approach at the moment.Does this make more sense now?I know this is not really a SQL Server question, but it is accessing a SQL Server database after all Advice, links ?__________________Make love not war! |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-11-06 : 06:55:31
|
I'm not much on Excel VBA either, but I do know in excel you can retrieve SQL Server data by going to Data - > Get External Data and specifying a data source. That would be scriptable for sure.(Just going to move this to a more appropriate topic area too... hope you don't mind )Damian |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-11-06 : 06:57:11
|
Okay.__________________Make love not war! |
|
|
|
|
|
|
|