on 01-26-2015 7:37 PM
Hi Experts, For Example My Source Field ---AAAAA------datatype v(13)-- has value 01234567891, when i write to csv file and when i open the file in Xl, it looses the leading zero Any Suggesion for not loosing the leading zero Thanks
Is the sole purpose of your csv file to visualise its content in Excel?
If you use a comma or a semicolon as the field separator, you can precede the field contents by a tab: insert a non-printable ascii x09 in front of its value by mapping it to chr(9)||source_fiield in your Query transform.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Uhdam,
You are not losing your leading zero. The problem is that you are opening your file in Excel which strips the leading zeroes. You can view your data using a text editor like notepad and you should be able to view the leading zeroes.
If you want to view your data in Excel, use the steps mentioned in the link below to open your csv file.
How can I keep leading zeros in CSV files?
-Chaitanya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The best I can think of if you have to have this, then you can add a single quote at the start of your data. For e.g: define your datatype as varchar and include a single quote so that the data looks like '012345. The problem with this is that when the user opens the Excel file, he will be viewing the data with the extra single quote.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.