Leading Zeroes being Truncated on a Text Field

Marc Jason Mutuc
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2014

A custom field of Text Field (single line) type is having numbers on it with leading zeroes. Upon extract, these zeroes are truncated.

4 answers

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2014

The .vm files are outputting the data correctly. The problem is in excel

You might be able to do something in the xml to tell excel "this is a string, not a number", but I don't know

0 votes
Marc Jason Mutuc
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2014

Ok. Tried to add a ' on the 000123. But still its shown like that on Excel. Probably need to look into vm files. Or somewhere else?

0 votes
Marc Jason Mutuc
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2014

Ok. Tried to add a ' on the 000123. But still its shown like that on Excel. Probably need to look into vm files. Or somewhere else?

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 1, 2014

Actually, they probably aren't being truncated on "extract", it's likely that whatever you are loading them into is doing it.

However, you've not told us what you're actually doing on "extract" or where the data is going that might be chopping the zeroes off. (For example, Excel will often take a guess that numbers are numbers even when the data it reads is a string)

Marc Jason Mutuc
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2014

Thanks Nic!

I have the following

Custom Field Name : Field A

Type : Text Field (single line)

Content : 000123456

When I extract the issue with this detail via export option on the issue navigator, the resulting Excel sheet no longer has the leading zeros and will only show 123456.

Is there some way to prevent this?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2014

It's excel dropping the digits, you need to change that behaviour in excel. From memory, it's something to do with cell formats, but I'm not sure.

If you opened the downloaded file generated by the export in a text editor (it's actually xml, not an excel file), you'll see your leading 0s are all there. It's the import into excel that's trying to be clever and breaking it.

Marc Jason Mutuc
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2014

Yes. It is Excel dropping the leading zeroes. Changing the behavior doesn't help. It does not bring back the leading zerios.

Yes. It is the export to Excel breaking things. Any idea how to remedy this?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2014
I don't know how to fix excel, I rarely use it. Open office seems OK when you change the column format to say text, but it has been a while since I played with it.

Suggest an answer

Log in or Sign up to answer