SSIS to Excel Data Types
Hi I have a problem with data extracted routinely to Excel reports via SSIS packages. Source: SQL Server 2008 database query Destination: Microsoft Office Excel 2007 (xlsx) Some of the source data columns are string types (DT_WSTR) and some are date (DT_DBDATE) and integer types. In the destination file all the data gets stored as text. This is a problem. I would like the date and integer values to be recognised and stored as such and not require the users to manually convert this wherever it happens. I've tried to set the types from within SSIS but no luck. Under the "Show Advanced Editor" I set the Output types to string and date, but all of the output turns up as "text" in Excel. Can anyone assist with this problem?
January 31st, 2011 3:46am

what excel source in SSIS dose is consider few rows and based on it it decides what type of data is there. use SSIS data conversion task and convert in relevant format before loading it.Gaurav Gupta http://sqlservermsbiblog.blogspot.com/ Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2011 4:42am

The problem is not the Excel Source, there is no Excel source. The source of the data is a query run on a SQL Server 2008 database and is then dumped to Excel (Destination) I tried to do data conversions with the Data Conversion task but conversions from DT_DBDATE to DT_I4 for example is not supported. I also don't think this is the problem as SSIS recognises the query results as Date but when it is dumped to Excel it is stored as text. Very frustrating.
January 31st, 2011 6:08am

Did you try converting the date to String and store the data? Thanks, S Suresh
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2011 9:16am

This question has been previously answered in another thread: http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/4132f52f-b751-4cb9-b477-f5ab70682be0
January 31st, 2011 9:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics