dbTalk Databases Forums  

How to programatically save an Excel file as a text file inside a DTS package?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss How to programatically save an Excel file as a text file inside a DTS package? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Walt Mallon
 
Posts: n/a

Default How to programatically save an Excel file as a text file inside a DTS package? - 11-10-2005 , 08:05 AM






I'm having trouble extracting data out of Excel 2002 Workbook files in SQL
Server 2000 DTS. I want to use an ActiveX task to save the Excel file as a
tab delimitted text file and then import the data from there. Something
like:

set theFile = pkg.Connections("Excel File")
theFilse.SaveAs "C:\file.tx."

Can this be done with VBA?

(Specifically, when the column in the Excel file is > 255 characters I can
use the IMEX switch and registry settings to select the data correctly--such
as using the opendatasource command--but when I try and insert the text data
into a SQL table I get junk for any column where the length is > 255.)

Thanks,

Walter




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.