How To Filter Non Alphanumerics Characters From Your String And Its Application In Excel

If you are like me, I have to deal with text a lot in my work. As a programmer, I need to find and match string. Recently, a friend of mine, who is an accountant gave me a list of books’ titles. Most of them are fine. However, there are some contains strange characters and she wanted to remove such titles.

As you can see in the picture, there titles with @ and Chinese characters. Using filters doesn’t work because there are more than 1000 rows. That was when I said to myself: “I need a tool”.

So, I made one for this specific purpose: “to help my friend remove all the strange characters in her Excel workbook”.

Here is how the tool look like:

As you can see, you can put the original text in the source string box, adjust a few options above and click on filter. The result will be shown in the Result string box:

As you can see that all the rows that contain strange characters are removed.

However, what if you have some special characters that is allowed to appear in the title? No worries! You can put that into the Allowed characters box and separated them by spaces.

For example, It is OK for me to have the character @ in the title, I would put @ into the Allowed characters box. In addition, that title contains the character dot (.) so you need to put that into the list of allowed characters too.

Let’s see what we’ll have:

As you can see now, the title with . and @ is accepted.

There are also two checkboxes that allowed you to filter the text further. You can decide to allow numbers or spaces in the title by checking these checkboxes.

I put the full source code for the tool here:

If you are not a programmer, you can download the application here to start using it:

Download the .jar file

If you have any suggestions, please let me know. Thank you very much!

How To Resize and Copy Images Files To Android Drawable Folders Quickly

I’m not a full time Android developer. I make Android apps such as this. Android studio is great and I can develop my ideas quickly. However, there is one thing I don’t like is the way I have to deal with images. Every time I need to add an icon to my app, I need to resize that image to the following sizes:

  1. 144 x 144
  2. 96 x 96
  3. 72 x 72
  4. 48 x48

And put them in the following folders, respectively:

  1. drawable-xxhdpi
  2. drawable-xhdpi
  3. drawable-hdpi
  4. drawable-mdpi

The task is boring and tedious. So, I decided to make a tool to make this task less painful.

How does the tool work?

Let’s say you want to use a new icon like this in your app:

Now, instead of resize and copy the file 4 times, you just need to open the tool:

The first step is to select your /res folder which contains the drawable-..dpi folders. The Directory Chooser will make this step simple an easy.

Now, look at the checkboxes, they are self-explanatory. If for some reasons, you don’t want to copy the image to a particular folder, simply uncheck the checkbox in front of it.

Then, click on select Image to select your image. The image should be square and have resolution at lest 144 x 144 pixel to avoid pixelation.

If your image is in JPG format, you select JPG, if it is PNG, select PNG.

After that, you click on open to complete the process.

And that’s all. You don’t need to open your image editor to resize the images. With less time spent, you have your images in all drawable folders.

Further features

I made this tool out of my need. I think there are more improvements to be made. Here are some ideas:

  • Let user set the resolution (instead of fixed size as of now)
  • Let user select more folders, even add folders outside the /res folder

The app is free and the repo is open on github. You can download the source and the app here

I hope the app can save you some precious time. Let me know if you have any suggestions.


Excel Software: How To Search For Text Through Multiple Big Excel Files

Working with big Excel spreadsheets never have been easy, especially when you need to search for a piece of text in a file that have thousands, even ten of thousands rows. Searching through a single file can cost you hours, if not days if you work on a slow computer. To make the matter worse, sometimes you need to search in multiple files and search for multiple strings.

Let me give you an example.

I have this excel file contains a list of order from a local store. For some reasons, the owner needs to search for the items with order ID “CA-2016-108210”.

a very big excel file with ten thousands rows
a very big excel file with ten thousands rows

Normally, you would press Ctrl+F or Command + F on a Mac to start searching. The file only has 10,000 rows and it takes me a second to find the match. If there are ten matches, you may need ten seconds. The problem becomes harder when you need to search through many sheets and multiple files.

There is always a better way, right?

Luckily, there is a better way to do this boring task, which is using a pieces of software made exactly to do this task.

Let’s have a look at the software and how it works.

Software to search text in big excel files
Software to search text in big excel files

As you can see, this is the software that solves the searching problem in big excel files. You see its true value when you have many files to search and many text to find. Also, the larger the files, the more time the software can save you.

This is the way this software work step by step:

  1. You select the file or files you need to search by clicking on add excel files button at the top left of the panel. You can select multiple excel files using this button.
  2. Then, enter the text you want to search in these files, you need to enter one search per line. There is no limit.
  3. Click on start searching

It takes some time for the software to go through the files and find the text you want to find. As you can guess, the bigger the files, the longer it takes to find all matches. However, in comparison to a human, the software is much quicker, by hundreds times.