Executing command in Job | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Executing command in Job

In the job i need to open the excel file at backend
m using the following command in my job step
d:myfiles est.xls
if i write this statement in the command prompt it opens that file
but when i use this statement in job it doesnt executing
plz give me advice related to that statement
You need to <b>access</b> the file, not open it.<br /><br />Opening an XLS file requires having the Excel software installed, and someone looking at the screen to consume the data.[<img src=’/community/emoticons/emotion-5.gif’ alt=’;)‘ />][<img src=’/community/emoticons/emotion-2.gif’ alt=’:D‘ />]
plz help me as i have microsoft office installed on it plz tell me how wil i
access that file

No, SQL Server can read data from XLS files without "opening" them from the command line. Not sure about DTS jobs – something like OPENQUERY?
there is no way to open file in job of sql server 2000?
as i have some script in that file that perform the initial function
after that the next steps of job wil execute

Did you try using the Import Wizard?
Ah wait – you have some VBA script inside the XLS? I wouldn’t even start trying to use anything like that in a process that is being handled by an external program (in this case: SQL Server).
yeah i have a vbapplication script in that excel file
wat can be the other alternative to do that

SQL Server can do a lot of things with data. You might try importing the data into a holding table, and have a stored procedure do the work that the VBA code in Excel is doing. If the work on the data involves a lot of Excel-specific processing, you may have to find a way to process the data before you get to the stage of uploading it to SQL Server.