cancel
Showing results for 
Search instead for 
Did you mean: 

Excel target in BODS 4.1

Former Member
0 Kudos

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,

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member106536
Active Participant
0 Kudos

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.

aasavaribhave
Advisor
Advisor
0 Kudos

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.

former_member187605
Active Contributor
0 Kudos

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.