Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   NZ Computing (http://www.velocityreviews.com/forums/f47-nz-computing.html)
-   -   how to convert capital letters to lower case (http://www.velocityreviews.com/forums/t567942-how-to-convert-capital-letters-to-lower-case.html)

Chris Mayhew 10-05-2003 04:46 AM

how to convert capital letters to lower case
 
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

KS 10-05-2003 05:19 AM

Re: how to convert capital letters to lower case
 

"Chris Mayhew" <no@e.male> 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



Chris Mayhew 10-05-2003 05:49 AM

Re: how to convert capital letters to lower case
 
"KS" <propertah@nospamm.ihug.co.nz> wrote in
news:blo9l7$13o$1@lust.ihug.co.nz:

>
> "Chris Mayhew" <no@e.male> 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.

Peter 10-05-2003 06:34 AM

Re: how to convert capital letters to lower case
 
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
-----------------------------

Peter 10-05-2003 06:40 AM

Re: how to convert capital letters to lower case
 
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


Chris Mayhew 10-05-2003 08:39 AM

Re: how to convert capital letters to lower case
 
Peter <nospamjynyl@yahoo.co.nz> wrote in
news:3f7fbd70@news.maxnet.co.nz:

> 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

Chris Mayhew 10-05-2003 08:41 AM

Re: how to convert capital letters to lower case
 
Chris Mayhew <no@e.male> 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.

Max Quordlepleen 10-05-2003 10:59 AM

Re: how to convert capital letters to lower case
 
On Sun, 05 Oct 2003 04:46:22 GMT, Chris Mayhew <no@e.male>
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."

Gurble 10-05-2003 11:24 AM

Re: how to convert capital letters to lower case
 
On Mon, 6 Oct 2003 00:09:14 +1200, Aaron Lawrence
<aaronlNOT@HEREconsultant.com> 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.

Aaron Lawrence 10-05-2003 12:09 PM

Re: how to convert capital letters to lower case
 
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


All times are GMT. The time now is 12:43 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57