Dougbert.com
Microsoft SQL Server Integration Services and more by Douglas Laudenschlager.

DTS Custom Task: Office XML Writer


posted by dougbert
06-21-2008

Downloads: 310
File size: 1.3MB
Views: 2,884
DTS Custom Task: Office XML Writer
Filed under: , ,

This Zip file contains the Visual Basic.NET source code for a DTS (not SSIS) custom task that I wrote in 2004 and only recently (2008) rediscovered. I wrote this code (1) to learn to write a DTS custom task (2) and to demonstrate how to write out Excel data without using the Excel driver or the Excel application. I threw in creating a Word table just to prove that I could.

The task lets you choose whether you want a new Excel workbook and worksheet, a new Word document and table, or both. It also lets you choose whether to display the output by launching (1) Notepad to view the XML output as text, or (2) Excel and Word to view the output in the intended applications, or both. Needless to say this latter feature was intended for a development and testing environment, and not for production!

I'm uploading the file since it may be of interest to anyone who still writes DTS custom tasks, or who's interested in writing out Office XML.

Disclaimers: This isn't production code, I haven't upgraded it for the current version of Visual Studio, the Excel and Word XML standard may have evolved (especially Excel), and so forth.

-Doug

Powered by Community Server (Non-Commercial Edition), by Telligent Systems