Hi ,
Our input data is in excel file, to read that file I converted to csv (comma delimited)
but here is one issue,
few columns have leading zeros in original excel file.When I converted to CSV , all leading zeros are disappeared.So I am not able to load them into target table.
When I open it as a text file I see zeros.Can you please help me out in converting excel to csv
Thanks
Sri
Read data from excel file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
My assumption was the leading zeroes are significant and the target field was thus some flavor of a string field. I have that 'problem' all the time with Excel, the 'business' supplies data in spreadsheets and the values should be something like '003287', but Excel will drop the leading zeroes unless the proper steps are taken.
It also has a problem with numeric values with a precision greater than 16, from what I recall.
It also has a problem with numeric values with a precision greater than 16, from what I recall.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Craig and Ray -Thanks for your reply .
Craig, as you said , I saved columns as text filed and loaded them into table now I see leading zeros.
I don't understand the second option you mentioned
"use a custom mask to force Excel to preserve the leading zeroes".Can you pease tell me how to do this
Thanks
Sri
Craig, as you said , I saved columns as text filed and loaded them into table now I see leading zeros.
I don't understand the second option you mentioned
"use a custom mask to force Excel to preserve the leading zeroes".Can you pease tell me how to do this
Thanks
Sri
Actually, I gave a specific example for that.
Format Cells, Number, Custom. Scroll through the 'Type' list to see all of the ones there by default, manually add one if need be. The '0' means you want to preserve any leading zeroes in that position.
So if I type in '123' but I need it to be '000123' then a Custom mask of '000000' will do the trick.
Format Cells, Number, Custom. Scroll through the 'Type' list to see all of the ones there by default, manually add one if need be. The '0' means you want to preserve any leading zeroes in that position.
So if I type in '123' but I need it to be '000123' then a Custom mask of '000000' will do the trick.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers