Data type mismatch -- SSIS
Hi All, I am moving some numerical data from SQL server to excel. After the data is moved, i am getting green flag in excel cell to which the data is moved. I have configured the excel column to accept only numbers, but still i am getting green flag in excel cells. When i click the cell i am getting this message "The number in the cell is formatted as text or preceded by a apostrophe" Can anyone tell me how can i over come the issue. ThanksAnwar
March 5th, 2007 10:05am

same problem and i have been looking for ever. seems no one knows. im writing here to see if anyone responds.Prez
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2011 11:43pm

Well Handling Numeric in exported data to Excel is bit tricky, Even if you specify format type for Cells in Excel it will overwrite formatting while writing Data to Cells and there is no way to control Format of the Cell from SSIS or outside. So do we have a solution, yes off course there is a workaround: Insert a Dummy Row below your Header Row in Excel with some dummy values in the same format as you are expecting to get for rest of rows. Now when SSIS will send rest of actual rows it will pick format from this Dummy row and use it for rest of the cells in the column. Dummy Row is an extra row and you would not want to show it to anyone else so you can HIDE the row even before inserting data from SSIS. It will still pick the Format from Hidden Row. I will be writing a BlogPost on it to Explain Step by Step.(I will post the link as soon as finish it) Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
October 20th, 2011 2:45am

here is the blog post http://sqlserversolutions.blogspot.com/2011/10/numeric-gets-converted-to-text-in-excel.html Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
October 20th, 2011 5:05am

here is the blog post http://sqlserversolutions.blogspot.com/2011/10/numeric-gets-converted-to-text-in-excel.html Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
October 20th, 2011 11:46am

Hey All, So final verdict is that this is a Microsoft Fail. The best solutions so far are what Rahul Sherwat and many others have suggested. Also in some random forum by some random person at some random time that did things to my brain I found this great little macro. Sub NoMoreApostrophes() With Worksheets("SheetName").UsedRange .Value = .Value End With End Sub I apologize that I forget where I got this from. But much credit is dew to the inventor. This basicly does as you can plainly read it sets the values of the cells in the named sheet to the values of the cells in the named sheet. lmao. Not sure how it will work out for each of your individual problems but give it a go and see how its functionality works for you. Peace.Prez
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2011 7:09pm

Hey All, So final verdict is that this is a Microsoft Fail. The best solutions so far are what Rahul Sherwat and many others have suggested. Also in some random forum by some random person at some random time that did things to my brain I found this great little macro. Sub NoMoreApostrophes() With Worksheets("SheetName").UsedRange .Value = .Value End With End Sub I apologize that I forget where I got this from. But much credit is dew to the inventor. This basicly does as you can plainly read it sets the values of the cells in the named sheet to the values of the cells in the named sheet. lmao. Not sure how it will work out for each of your individual problems but give it a go and see how its functionality works for you. Peace.Prez
October 22nd, 2011 2:07am

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

Other recent topics Other recent topics