Another option might be to program the extract directly in Excel, and then
batch the Excel file. For example, you could use the Data->Import External
returning the rows to Excel. Set up a macro to save the data to a new sheet
right before you exit Excel. Then batch the Excel file. I've used this type
of extract on a number of occations and it works just fine. DTS is
to a flat CVS file and then import into Excel. And since you want to
"John Bell" <jbellnewsposts@hotmail.com> wrote in message
news:cAEHb.270$0W3.2097243@news-text.cableinet.net...
> Hi
>
> There are plenty of examples of using BCP by searching google but this
will
> create a CSV file that will need converting into Excel format, but can be
> loaded into Excel e.g:
>
>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=OlRefT56BHA.2252%40tkmsftngp04
>
> Other alternative is to use the sp_OA* procedures e.g
>
http://www.sqlmag.com/Articles/Index.cfm?ArticleID=9153 >
> John
> "Vamsi" <anonymous@discussions.microsoft.com> wrote in message
> news:04d901c3c8f2$ca146180$a101280a@phx.gbl...
> > Hi,
> >
> > Thanks. I think you have missed a few lines in my post.
> > The Site that you have suggested me completely deals with
> > DTS!!
> > I CANNOT use DTS due do some reasons,,, is there another
> > way???? like may be i can create a batch job, and
> > schedule it in windows!!!
> >
> > If I can do it with a batch job,,, how do i go about
> > writing the sql stmts("Exec myStoredProcedure" & "Save
> > outputfile") in the batch file?? Can you pls advice.
> >
> > Thanks,
> > Vamsi
> >
> >
> > >-----Original Message-----
> > >Hi
> > >
> > >You may want to create a DTS job, there are plenty of
> > examples of this sort
> > >of things at
http://www.sqldts.com/default.aspx?6 > > >
> > >Alternatively, you may want to look at creating a file
> > importable by Excel
> > >such as a CSV file and use the BCP utility to create it.
> > >
> > >mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%
> > 20Server\80\Tools\Books\cop
> > >rompt.chm::/cp_bcp_61et.htm
> > >
> > >John
> > >
> > >
> > >
> > >"Vamsi" <anonymous@discussions.microsoft.com> wrote in
> > message
> > >news:018c01c3c861$116e73a0$a001280a@phx.gbl...
> > >> Hi,
> > >>
> > >> I want to create a Batch job for Executing a Stored
> > >> Procedure and saving the output into an Excel Sheet,
> > >> Could someone advice me how to go about this.
> > >>
> > >> I want to schedule a job in Windows. I cannot use DTS
> > due
> > >> to some reasons. How can i go about saving the commands
> > >> in a batch file and scheduling this job??
> > >>
> > >> Thanks for any help
> > >> Vamsi.
> > >
> > >
> > >.
> > >
>
>