Posts Tagged ‘text’

Create a single line of text from a table for logging

Monday, June 15th, 2009

Have you ever wanted to copy a chunk of text from a web page for logging in an Excel spreadsheet and have been supremely annoyed by the formatting and spacing and all manner of other things that make it untidy and tedious?

Well, we did.  So, a couple months ago, we added a new text mangling tool to our simple web tools page, we introduce, The Simplify to a single string – granted, we don’t have the prettiest names for our web tools.

It was originally designed to online transaction details from a bank web page that includes a small table, and turn it into a single string that we save in Excel for logging purposes.  It’s turned out to be useful for mangling all sorts of web snippets to make them Excel, Word, and even email friendly.

We strip all formatting, remove extra spaces, and modify table cells and line breaks by replacing the breaks with dashes (“-“).

It’s useful to us, and hopefully to you!  Enjoy.

Creating a single-quoted comma separated line of text

Friday, March 27th, 2009

Today I had a need to create a single line of text like this:

‘product1.jpg’, ‘product2.jpg’, ‘product3.jpg’

From a text blob that looks like this:

product1.jpg
product2.jpg
product3.jpg

This text chunk, in this case, comes from a copy-and-paste from a “dir *.jpg” in a Windows XP command window.

There were actually only 6 image file names that I wanted to put into an array in PHP, but I had a feeling that I would be doing this type of task again, so I spent the time to build a tool for it.

So if you need to do something similar, please try the latest addition to Perceptus’ Web Tools site, the List to single quoted CSV Text Wizard (admittedly, we don’t save our best names for that site).  All you need to do is paste in a bunch of words, one per line, and you’ll get back the one line CSV.

I think this will be handy for creating source code for arrays in many languages, and also creating the bulk of the syntax for an IN () SQL statement.