Scott Huffman wrote:
I am new to open office, so maybe I am doing something wrong. I have a
spread sheet from MS-Excel that my company stores all of our IP's and
other
info.
Using the Find & Replace in Open Office doesn't find the the ip
address about 90% of the time. The document is 20 sheets long, and I
would
like to be able to search all fields, and all sheets at once. I have even
opened a new OpenOffice Calc spreadsheet and put 10.220.0.0 and a few
other
10.*.0.0 address. If I then run find on this new spreadsheet
searching for
10.220 it says: searched to end, continue at beginning, then after
clicking
yes, Search Key not found. I have set it to search in formulas, checked
Search in all sheets, tried Similarity Search, and unchecked Entire
Cell. I
am running Windows Server 2003 through remote desktop, OpenOffice
2.0.2. I
wanted to see if anyone else was having a similar problem?
Thanks
Scott
How is the IP stored in the sheet? In other words, is this actually text
that you can read? I mean, is the cell of type text, or is the address
stored as an object that IS an ip address?
Why am I so curious? If I have a cell that stores a URL in a field then
I do not find the URL. For example, I entered the text "my link here"
into cell C3. I then ran the macro below, which turns cell C3 into a
hyperlink. I can still serach for the text "my link here", but I can NOT
search for the text "10.220.0.0", which is the actual value of the link.
I could write a macro that searched for it, but off hand, I do not know
how to search from the GUI (but someone else probably does).
Sub InsertURLIntoCell
Dim oText 'Text object for the current object
Dim oField 'Field to insert
Dim oCell 'Get a specific cell
Rem Get a cell, any cell. This obtains cell C3
oCell = ThisComponent.Sheets(0).GetCellByPosition(2,2)
REM Create a URL Text field
oField = ThisComponent.createInstance("com.sun.star.text.TextField.URL")
REM This is the actual text that is displayed for the URL
REM This could just as easily be
REM oField.Representation = "My Secret Text"
oField.Representation = oCell.getString()
REM The URL property is just a text string of the URL itself.
oField.URL = ConvertToURL(oCell.getString())
oField.URL = "http://10.220.0.0"
REM The text field is added as text content into the cell.
REM If you do not now set the string to zero, then the existing
REM text will remain and the new URL text field will be appended
REM to the end.
oCell.setString("")
oText = oCell.getText()
oText.insertTextContent(oText.createTextCursor(), oField, False)
End Sub
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]