2

I am using a SSIS Data Flow Task to export data from SQL Server to an Excel destination, but while exporting it converts int values to "Numbers Stored As Text" Excel cells and every cell gets this error "number stored as text" with a green tag.

Can you please guide me how I can export my int values from SQL Server to a number in Excel?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
vinisha9
  • 91
  • 1
  • 2
  • 8

2 Answers2

0

The solution that has worked for me is to add numeric values to the numeric columns so that it knows to format the destination as numeric in your template sheet. You can either hide the values or overwrite them with the new data that you are posting to the file.

So essentially just add a row with template data and formatting and hide that row. When the import occurs, it will copy the first (hidden) row formatting.

Jonathan Porter
  • 1,365
  • 7
  • 34
  • 62
  • Hi jonathan. Can you please let me know how to write data to a template file. – vinisha9 Nov 07 '16 at 15:04
  • Is your package creating a new Excel file every time or exporting data to an existing Excel file? My solution only works if the file already exists and you can edit it. – Jonathan Porter Nov 07 '16 at 15:28
  • Its creating a new file. I also tried using filesystem task to copy a template file but i cannot achieve even with that – vinisha9 Nov 07 '16 at 17:26
0

as you are importing the values to a excel their should be data conversion, if not you will get an error.

Please see the link below for more details: Error converting data types when importing from Excel to SQL Server 2008

Warm Regards Safi

Community
  • 1
  • 1
Looking_for_answers
  • 343
  • 1
  • 6
  • 20