Summarize this article:

Although this may take a while and displace your belongings, it will be hard to get a good idea of measurements and space while the closet is full. Find other places to store the items in your house or garage. This is the length from the doors to the back of the closet. Closets can be deep or shallow, and this will determine the size of your desk and chair and how much you can fit into the office space. You do not need a walk-in closet to create an office. However, it is a good idea to choose a closet that is deeper than a hanger's width. The desk and chair will not go too far out into the room or hallway, if it is deeper. Count the number of electrical appliances you need to plug in, and buy a power strip or surge protector. You can provide your electricity in 1 of 2 ways:  If you want to have an overhead light, a computer, a printer, a scanner and more in your office, then you should consider hiring an electrician to rewire your existing electricity into your new office. This will allow you to feel safer about the power sources that control your many electronic devices and it will also allow you to install an overhead pendant light. If you plan to fill your office with a few simple electronic devices, such as a desktop and a clip lamp, you can extend an extension cord from a nearby plug to your office. You should buy clips to secure the cords to the bottom of the wall so that no one will trip over the cords. You can also consider getting a hard mat or soft rug that will go over any cords that extend too far. If you have a walk in closet, this might not be necessary, but in most cases, you will create more space by removing the doors, so that you have more space to fit in desks, organizers and a chair.  While removing the doors creates a more accessible office, you may want privacy when you work in your office. In this case, consider buying a collapsible screen that you can put in to divide you from the room or rest of the house when you want some privacy. You can also place a colorful curtain in front of the office to hide it when it's not in use. Vacuum the floors, dust the corners and clean the walls and shelves with soapy water and a sponge.

Summary:
Remove all your clothes or objects from the closet. Measure the depth of your closet. Devise electrical support for your office. Remove the doors to your office. Clean your closet well before turning it into an office.