This is pretty much in the same boat as changing from an automatic to a manual transmission. It can be done, and people have done it in the past. However, it is a lot of work and most people just opt to buy a car that already has a sunroof/manual transmission.
It all depends on how much time and money you are willing to shell out...or how much skill you have with automotive welding, body work, and paint.