[TriLUG] openoffice question
kohei.yoshida at gmail.com
Tue Jan 3 09:38:19 EST 2006
On 1/2/06, Ryan Leathers <ryan.leathers at globalknowledge.com> wrote:
> Any openoffice whiz-kids able to 'splain this to me?
> I have used excel in years past to create a quick list of sequential IP
> addresses by typing the first and then dragging that cell to generate
> the next 254.
> In openoffice, this same procedure increments the value of the first
> octet rather than the fourth.
I think it's related to how the cell content is parsed internally. I
can't tell you exactly how Calc does since I haven't read that part of
the code for a while, but I do know that Calc doesn't recognize IP
address format yet. My guess is that Calc first tries to parse as a
decimal number, sees a second decimal separator, and falls back to
parsing as as integer with suffix, which in case of "192.168.1.1",
"192" as the integer and ".168.1.1" as the suffix. In this case, the
default increment is 1, so you will get a series of 220.127.116.11,
18.104.22.168, and so on...
IP address format recognition may have been requested in the past,
though I'd have to check IssueTracker just to be sure...
The work around it would do for now is to put each octet of an IP
address into an individual cell, say, '192' in A1, '168' in B1, '1' in
C1 and '1' in D1, and use CONCATENATE cell function in cell E1 to put
and drag cell D1 down for incremental fill, and Ctrl-drag A1 through
C1 for simple fill i.e. non-incremental fill.
More cumbersome than Excel I know, but it works.
Oh BTW, this is my first post here. So, hi everybody. :-)
OpenOffice.org Calc Developer
More information about the TriLUG