Author |
Topic |
Paul Marks
Starting Member
7 Posts |
Posted - 2006-11-22 : 07:07:41
|
Dear ForumI have a problem where i am trying to write a procedure to open up an existing excel template rename the created sheet and export data to it.Can someoneout there please assist with the syntax and SQLWith Kind REgardsPaul |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-22 : 07:12:18
|
Huh?You want us to do your work for you?Have you tried GOOGLE?Peter LarssonHelsingborg, Sweden |
 |
|
Paul Marks
Starting Member
7 Posts |
Posted - 2006-11-22 : 07:36:53
|
Dear PesoNo just some direction would be helpfulThank you |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-22 : 07:50:49
|
DTS?SSIS?Peter LarssonHelsingborg, Sweden |
 |
|
Paul Marks
Starting Member
7 Posts |
Posted - 2006-11-22 : 08:00:59
|
PesoI can see you are increadibly helpful. Are you always like this with every one on the forum or have you taken some distinct dislike to me in particular. Can you help. If not just say soThe DTS routines will not dynamically rename a new sheet based upon a template. As for the SSIS method. I am not familar with this |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-22 : 08:04:23
|
Only with people who want other people to do their chores.T-SQL can not rename a Excel Sheet for you.You have to implement some kind of OA_method for this.See if this article helps http://msdn.microsoft.com/msdnmag/issues/04/04/DataPoints/Peter LarssonHelsingborg, Sweden |
 |
|
Paul Marks
Starting Member
7 Posts |
Posted - 2006-11-22 : 08:14:13
|
PesoI never had ANY expectations of someone performing my chores. Just some assistance from another Human being who knows a little more than I.I refute the insinuation!!!!!With Kind RegardsPaul |
 |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2006-11-22 : 09:56:38
|
quote: Originally posted by Paul Marks Dear ForumI have a problem where i am trying to write a procedure to open up an existing excel template rename the created sheet and export data to it.Can someoneout there please assist with the syntax and SQLWith Kind REgardsPaul
Paul,First off what version of SQL Server?In any case sounds like you need to work with COM Automation...Ken Henderson's book talks a lot about this, but I am curious as to why you need to do this....for the most part when I do stuff like this, I usually archive what was, and move the new data in.Who is giving you this requirment.It helps us if we understand what and why you are trying to do something.Also, read the hint link in my sig.Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
Paul Marks
Starting Member
7 Posts |
Posted - 2006-11-22 : 10:16:04
|
Dear BrettFirstly thank you for your reply.SQL 2000 v8.0The requirement is as follows: Part of a larger applicationA series of Service Audits for a well know supermarket scheduled and produced on a routine basis (via the app) ~ 30 /day. The results of these sent to an individual spreadsheet based upon one template. A spreadsheet would be created automatically after each scheduled execution of the app via the stored proc.I believe Peso has probably answered my questions by indicating that the solution to this problem is not resolvable using this methodology.We were trying to avoid developing an interface for this by just executing a Stored Procedure. All the parameters required from the stored data to name the newly created s/s based upon the template were available from the source data.If this is not the solution OK. Like you have suggested would need to develop code to do this within the app.With Kind RegardsPaul |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-22 : 10:37:11
|
What are the sheet named as?If the names are not changing, it is very possible to put the data in some single cells in Excel.I recently did this for inTouch Solutions in Chicago.Peter LarssonHelsingborg, Sweden |
 |
|
Paul Marks
Starting Member
7 Posts |
Posted - 2006-11-22 : 10:48:37
|
PesoEach worksheet would have its own name based upon an eventid for the generated schedule. IE:- Smktsurvey12345.xls the next one being Smktsurvey12346.xlsectWith Kind RegardsPaul |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-22 : 10:51:56
|
Well I don't think that is the sheet name. I believe that is the FILE name.What I did for inTouch, was that I created one template file and with xp_cmdshell I copied that file to the new position and used OPENROWSET to set some single cells to new values. Then the graphs in the sheet automatically were updated upon opening the file.Peter LarssonHelsingborg, Sweden |
 |
|
Paul Marks
Starting Member
7 Posts |
Posted - 2006-11-22 : 11:17:00
|
Dear PesoApologies for confusing terminology. Not my intention.It appears from you wealth of experience that the solution I am sourcing using this method is not possible. Back to redeveloping the app I think.Thank you all for your assistance. Greatfully appreciatedWith Kind RegardsPaul |
 |
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2006-11-22 : 13:38:11
|
DTS should be able to dynamically create file names using variables.STAR SCHEMAS ARE NOT DATA WAREHOUSES! |
 |
|
|