Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > how to convert capital letters to lower case

Reply
Thread Tools

how to convert capital letters to lower case

 
 
Chris Mayhew
Guest
Posts: n/a
 
      10-05-2003
Hi

I have a spreadsheet (Open Office) with some text strings in a column that
are all capitals which I would like to convert to lower case except for the
first letter in each word.

There are 17,088 rows of data (text strings) to convert so I was looking
for some ideas on how to automate this process.

Any ideas ?

TIA
Chris
 
Reply With Quote
 
 
 
 
KS
Guest
Posts: n/a
 
      10-05-2003

"Chris Mayhew" <(E-Mail Removed)> wrote in message
news:Xns940BB4CC6F3ECnoemale@202.20.93.13...
> Hi
>
> I have a spreadsheet (Open Office) with some text strings in a column that
> are all capitals which I would like to convert to lower case except for

the
> first letter in each word.
>
> There are 17,088 rows of data (text strings) to convert so I was looking
> for some ideas on how to automate this process.
>
> Any ideas ?
>
> TIA
> Chris


I do this in MS Office by copying from Excel and pasting the cells into
Word, and using CHANGE CASE to convert to Capital Case. Then paste back into
Excel, and use Text to Columns to split the text back into columns.

Dont know about Open Office though.

KS


 
Reply With Quote
 
 
 
 
Chris Mayhew
Guest
Posts: n/a
 
      10-05-2003
"KS" <(E-Mail Removed)> wrote in
news:blo9l7$13o$(E-Mail Removed):

>
> "Chris Mayhew" <(E-Mail Removed)> wrote in message
> news:Xns940BB4CC6F3ECnoemale@202.20.93.13...
>> Hi
>>
>> I have a spreadsheet (Open Office) with some text strings in a column
>> that are all capitals which I would like to convert to lower case
>> except for

> the
>> first letter in each word.
>>
>> There are 17,088 rows of data (text strings) to convert so I was
>> looking for some ideas on how to automate this process.
>>
>> Any ideas ?
>>
>> TIA
>> Chris

>
> I do this in MS Office by copying from Excel and pasting the cells
> into Word, and using CHANGE CASE to convert to Capital Case. Then
> paste back into Excel, and use Text to Columns to split the text back
> into columns.
>
> Dont know about Open Office though.
>
> KS
>
>
>


Thanks, I just worked out a similar way using a program called Edit Pad - I
copied the cells I wanted to convert to Edit Pad (a notepad replacment) -
converted to "Title" (first capital letter only) - saved as a *.csv file -
Opened that in Calc - copied the cells and pasted them back into the still
highlighted cells in the original spreadsheet.
 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      10-05-2003
this quote is from Chris Mayhew of Sun, 05 Oct 2003 17:46 :
> I have a spreadsheet (Open Office) with some text strings in a column that
> are all capitals which I would like to convert to lower case except for
> the first letter in each word.


Hmmm, there doesn't seem to be a capital case function in OpenOffice.
This little basic macro (below) seems to do the trick. (Watch out for the
line wrap on a couple of lines.)

I see from the other post that you sorted this problem already, but I was
looking for some practice with OpenOffice macros.

cheers

Peter


----------------------------
Function ccase(str As String) As String
dim result as string
dim Pos1 as long
dim Pos2 as long

result = ""
Pos1 = 1
Pos2 = 2

if str <> "" then
do while Pos2 <> 0
Pos2 = instr(Pos1, str, " ")
msgbox cstr(Pos2)
if Pos2 <> 0 then
result = result + ucase(mid(str,Pos1,1)) +
lcase(mid(str,Pos1+1,Pos2-Pos1))
Pos1=Pos2 + 1
else
result = result + ucase(mid(str,Pos1,1)) +
lcase(mid(str,Pos1+1,len(str)))
end if
loop
end if
ccase = result
End Function
-----------------------------
 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      10-05-2003
this quote is from Peter of Sun, 05 Oct 2003 19:34 :
> This little basic macro (below) seems to do the trick. (Watch out for the
> line wrap on a couple of lines.)


oops, delete the msgbox line from that macro
It was for checking as I wrote the macro.
(I told you I was learning.)


Peter

 
Reply With Quote
 
Chris Mayhew
Guest
Posts: n/a
 
      10-05-2003
Peter <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> this quote is from Peter of Sun, 05 Oct 2003 19:34 :
>> This little basic macro (below) seems to do the trick. (Watch out
>> for the line wrap on a couple of lines.)

>
> oops, delete the msgbox line from that macro
> It was for checking as I wrote the macro.
> (I told you I was learning.)
>
>
> Peter
>


Thanks for your efforts. I don't know much about Macro's either so I guess
I got lucky with the method I used. Editpad doesn't have the 32K limit
that I believe Notepad has (?) http://www.editpadpro.com/

I couldn't get your macro to work but I have a list of 17,085 all capital
words if you want them - 1 word per line - 154KB text file. I found, just
as a matter of interest that pasteing them to Editpad was quicker than into
an Open Office doc (no formatting, of course).

Chris
 
Reply With Quote
 
Chris Mayhew
Guest
Posts: n/a
 
      10-05-2003
Chris Mayhew <(E-Mail Removed)> wrote in
news:Xns940BDC520ED2Dnoemale@202.20.93.13:


BTW I have the same number of records containing multiple all capital words
per line as well.
 
Reply With Quote
 
Max Quordlepleen
Guest
Posts: n/a
 
      10-05-2003
On Sun, 05 Oct 2003 04:46:22 GMT, Chris Mayhew <(E-Mail Removed)>
proffered, in : news:Xns940BB4CC6F3ECnoemale@202.20.93.13:

> I have a spreadsheet (Open Office) with some text strings in a
> column that are all capitals which I would like to convert to
> lower case except for the first letter in each word.
>

For some reason, the "Title" mode (initial capitals, is accessible in
OOo Writer, but not OOo Calc. Having seen this issue come up in two
different places today, I may have pull finger and submit a feature
request for it. I hope that you have found a satisfactory solution to
your problem.

--
"If there's anything more important than my ego around, I want it
caught and shot now."
 
Reply With Quote
 
Gurble
Guest
Posts: n/a
 
      10-05-2003
On Mon, 6 Oct 2003 00:09:14 +1200, Aaron Lawrence
<(E-Mail Removed)> wrote:

>Thus spake Peter:
>> Function ccase(str As String) As String
>> dim result as string
>> End Function

>
>Innit funny seeing vbscript in another company's product. How jolly
>thoughtful of the OO team



Get a life.

Ever heard of BASIC?

VBScript isn't exactly "revolutionary". Your post implies that anyone
who incorporates a scripting language loosely resembling BASIC has
copied microsoft with their pile of dog vomit VBScript.

No, Microsoft *didn't* invent Basic. Copied it as usual, sure, but had
nothing to do with it's inception.

Idiot.
 
Reply With Quote
 
Aaron Lawrence
Guest
Posts: n/a
 
      10-05-2003
Thus spake Peter:
> Function ccase(str As String) As String
> dim result as string
> End Function


Innit funny seeing vbscript in another company's product. How jolly
thoughtful of the OO team

--
aaronl at consultant dot com
For every expert, there is an equal and
opposite expert. - Arthur C. Clarke
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
OptionParser: using upper AND lower case option letters timm Ruby 1 05-09-2005 03:10 PM
Function to convert all of the small letters to the capital? Ebi C++ 2 02-05-2005 12:59 AM
Changing from capital letters to small letters using perl Venugopal Perl Misc 11 11-05-2003 06:07 PM
Upper and Lower case letters Ch. Rajinder Nijjhar Jatt Computer Support 5 11-02-2003 05:16 PM



Advertisments