on 03-04-2014 8:14 AM
Hi All,
My requirement is to write the data to an excel file and mail to the support team. Is it possible to create the excel file via ODBC? I know that DS won't support excel target directly. Please help.
Thanks,
Handy vbscript you can try:
InputFileName = "C:\Documents and Settings\jblythe\Desktop\sample_file.csv"
FullName = InputFileName
FileName = Left(InputFileName, InstrRev(InputFileName, ".") )
Set objExcel = CreateObject("Excel.application")
set objExcelBook = objExcel.Workbooks.Open(FullName)
objExcel.application.visible = false
objExcel.application.displayalerts = false
objExcelBook.SaveAs FileName & "xls", 39
objExcel.Application.Quit
objExcel.Quit
Set objExcel = Nothing
set objExcelBook = Nothing
list of file saveas formats: Excel 2007 Developer Reference
caveat here is that excel can have issues with unicode.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont think it is possible even via odbc. The most you can do is write to a csv target using firle formats and the csx can be opened and saved as xls or xlsx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note that there is a search box in the top right-hand corner of this page. If you type "excel target" and select the magnifying glass, you will find 67 hits on this forum. I am sure there's at least one that will give you an answer to your question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.