December 14, 2005 at 7:56 am
I have a DTS package that creates an Excel file every 2 weeks. A new file is created each time rather than overwriting the old one. It works fine, BUT...
The client has now requested spcific formatting (fonts, fill colors etc.) in the Excel files. The problem is, Excel is not installed on the database server. Is there any way to get to the Excel file and format it from the DTS package? This really needs to be automated, not done manually.
December 14, 2005 at 9:03 am
AFAIK, you would need Excel installed. I have a similar required process (monthly) I currently run the DTS package, grab the file to my local system (where I have Excel installed) then run a VBS script file to do all the formating using the WScript.CreateObject("Excel.Application") object. I'd love to hear if there is another way.
Cheers..
December 14, 2005 at 9:07 am
So you're running your VBScript manually on your local machine, or do you have an automated process that does it?
Excel is installed on the shared drive where the Excel files are being saved, I'm hoping there's a way to tell that server to do the Excel formatting...
December 14, 2005 at 9:09 am
You will need to write an activex task to do so, but it is possible.
You don't need to install excel as far as I know, but you will have to regsister the excel libraries on the server in order to do this.
That's about as much as I can help.
December 14, 2005 at 9:13 am
Mine is manual now, but could easily be added to Schduled Tasks if you knew when the file would be available.
SQLServer creates the file as part of a sheduled job
The machine that has Excel, can have a job to check for and format the file.
Cheers..
December 15, 2005 at 7:37 am
Here is what we do:
We created Excel file with all the formatting they want. That workbook has hidden worksheets that have no formatting. DTS overrides the hidden worksheets on every run (drop and add a table to Excel). The formulas within workbook, use hidden worksheets as datasources for visible and formated worksheets. At the end of the DTS package, the file is copied with date-specific filename and link to that file is distributed through email (also in DTS).
Hope that helps
Vadim.
December 15, 2005 at 8:01 am
OMG, I never thought of just copying a formatted workbook with a new name! I'll try that - thanks!
December 15, 2005 at 1:56 pm
Hi!
Or You can use OpenOffice... It's free... :-))
The automation system of it is a bit different to Excel's... But easely learnable... :-)))))
December 15, 2005 at 2:12 pm
Thanks for the suggestion, but Excel is mandated by company policy.
December 15, 2005 at 7:09 pm
Hi!
You are welcome...
Ah I see... They could mandate a copy to your database server machine...
June 8, 2008 at 12:46 pm
Hi Vadim:
Please I need your help, could you send me an excel file as an example of what you mentioned about using hidden worksheets as input to the formatted excel file ?
My email is: jvillarg@viabcp.com
Thanks for your help.
June 8, 2008 at 12:51 pm
Hi Vadim:
Please I need your help, could you send me an excel file as an example of what you mentioned about using hidden worksheets as input to the formatted excel file ?
My email is: jvillarg@viabcp.com
Thanks for your help.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply