Question:
Is there a way to take a large series of text and make it into one vertical line?
anonymous
2010-01-09 11:23:15 UTC
I have a large block of text and wondering if I could make it into one vertical line in word or excel.

For example:

BPBBBPPBBBP...(the actual block is much larger, many pages)

could this be turned into:

B
P
B
B
B
P
P
B
B
B
P..

using a formula or special excel/word function?
Four answers:
?
2010-01-09 12:14:52 UTC
Put it in a text file and email it to me at mikedavis80@gmail.com. I'll email it back in a text file in the format you want. It will take me a minute or two to write a java file that will do it for you and do the conversion. Also please specify if you would wrather it were in spreadsheet format or just text.
sparklychef
2010-01-09 19:30:36 UTC
The only way I can think of to do that is with an html page, by adding a
tag after each letter or word, but that would take a very long time. You might want to look up CSS codes though, (if you know css) because there might be a text formatting code that allows you to put everything in a vertical line. As far as I know, you can't do that in microsoft word, unless you change it into word art.
Julian
2010-01-09 21:35:52 UTC
If you have perl installed you can go to your command line and type this:



perl -ne 'print "$_\r\n" for split //' name_of_textfile



That works on unix and it should work on the command line of Windows, as well. Although, the -ne may have to be /e /n or something like that. I know it seems a bit unusual but that was all I could think of.
deonejuan
2010-01-09 21:29:57 UTC
You will have to do it in Word. You will have to do it in OfficePro. Then, it can be done in BASIC.



With Excel, you are limited to 1659 characters in one cell. You are limited to 255 cells with one function.



In MSOfficePro you can program a macro



Public Function StringToCharArray(ByRef sIn As String) As String()



StringToCharArray = Split(StrConv(sIn, vbUnicode), Chr(0))



End Function



Public Function LoopArray( ByRef arr As String() )

Dim iIndex = LENGTH(arr)

For x = 0 to iIndex-1

document1.Print arr(x)

End Function



// Now, I hate VBasic with a passion, I won't contract VB, and so my code is untested but shows the general idea.



good luck


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...