SSIS Data from SQL Server into an Excel File Using SSIS

Rontech10111 141 Reputation points
2025-01-30T10:30:43.9133333+00:00

Good day,

I have data like the below:

CREATE TABLE [dbo].[test_data](

[Local_Site] varchar NULL,

[LM_Company] [int] NULL,

[TotalStaff] [int] NOT NULL,

[NewOpp] nvarchar NULL,

[ExistOpp] nvarchar NULL,

[EasyTarget] [int] NOT NULL,

[GoldTarget] [int] NOT NULL,

[PremierTarget] [int] NOT NULL,

[BusinessTarget] [int] NOT NULL,

[COMMENTS] varchar NULL,

[SSCode] varchar NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

INSERT [dbo].[test_data] ([Local_Site], [LM_Company], [TotalStaff], [NewOpp], [ExistOpp], [EasyTarget], [GoldTarget], [PremierTarget], [BusinessTarget], [COMMENTS], [SSCode]) VALUES (N'Romey Park', 7860940, 3, N'3', N'0', 3, 0, 0, 0, NULL, NULL)

INSERT [dbo].[test_data] ([Local_Site], [LM_Company], [TotalStaff], [NewOpp], [ExistOpp], [EasyTarget], [GoldTarget], [PremierTarget], [BusinessTarget], [COMMENTS], [SSCode]) VALUES (N'Northvale', 7860940, 5, N'5', N'0', 5, 0, 0, 0, NULL, N'ss453890')

INSERT [dbo].[test_data] ([Local_Site], [LM_Company], [TotalStaff], [NewOpp], [ExistOpp], [EasyTarget], [GoldTarget], [PremierTarget], [BusinessTarget], [COMMENTS], [SSCode]) VALUES (N'Killarney', 7860940, 4, N'0', N'0', 0, 0, 0, 0, N'I called the client again to follow up and arrange a date for the presentation. The client''s response was that they would like to postpone.', N'ss334678')

INSERT [dbo].[test_data] ([Local_Site], [LM_Company], [TotalStaff], [NewOpp], [ExistOpp], [EasyTarget], [GoldTarget], [PremierTarget], [BusinessTarget], [COMMENTS], [SSCode]) VALUES (N'Douglasdale', 7860940, 4, N'0', N'0', 0, 0, 0, 0, NULL, N'ss457890')

GO

 

I would like to export this data to excel 2016 using an SSIS package.

 

How can I create the package so that the data types are correct in the excel columns, thus numeric column data should be 'number' format and non-numeric column data should be 'text' format

 

The result I get is the below (the numeric data is not of a number format):

 

 Screenshot 2025-01-30 124311

 

Kindly advise

 

Thanks

 

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,638 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.