question

matmar avatar image
matmar asked

SSIS Excel Import ALWAYS NUMBERS WITH DECIMALS

HELP!!! I know what to do to import mixed data types or force the import to treat everything as a text. But what about the other way round??? I have spent weeks (really!) to search for a good solution to import Excel data as numbers. It sounds so simple and I am almost going crazy because I just don't see a way to achieve it. Imagine this: There are 2 columns A and B which contain account codes and account descriptions. This will be imported as text and I am fine with it. But then I have 12 more columns C to N which should contain only numbers. Unfortunately these 12 columns have text in the first 5 rows. It might happen that in one whole column there are only 1 or 2 numbers further down in the rows. So the majority is text. But I need to import it as numbers. Because when it is imported as text it will take the format of the Excel sheet. And this is really bad because I am loosing decimals and negative values appear differently. Unfortunately I cannot rely on the formats because I am getting more than 300 Excel sheets from all the continents. Example: If -123.45 is formatted as (123) I will get (123) if I import it as text. But I really need the correct value which is -123.45. Or am I misunderstanding something completely? Please let me know if it is unclear. Thanks a lot in advance for your help!
ssisexcelimportdecimal
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Kash avatar image
Kash answered
So is SSIS converting all these columns to text and you would like them to be numeric? Is that correct? I believe there are two solution: 1. Import it into SQL as Text and then use Cast/Covert to switch data types 2. Force SSIS to use a float data type. Including a picture on this. ![alt text][1] Good Luck Kash [1]: /storage/temp/396-ssis-pic.jpg

ssis-pic.jpg (70.6 KiB)
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.