Read a Number column with leading zeros

34 views
Skip to first unread message

selv...@gmail.com

unread,
Oct 17, 2013, 4:36:33 AM10/17/13
to ruby...@googlegroups.com
Hi all,

I am trying to open and read a xlsx file, which I have attached. The
upc column in that file, is the one I'm talking about. If I open the
file in the Open Office Spreadsheet, it is correctly displaying with
leading zeros. But if I read it with Roo gem it truncates the leading
zeros. I understand this is the expected behavior since the column
type is Number. But how is Open Office correctly displaying it? Is
there is way to achieve the same using Roo?

--
Azhagu Selvan

http://tamizhgeek.in
test.xlsx

SuperKevy

unread,
Oct 23, 2013, 5:20:59 PM10/23/13
to ruby...@googlegroups.com
You formatted the column as text.  Try inserting a single ' in front of the numbers.  Same issue as zip codes
Reply all
Reply to author
Forward
0 new messages