Versatile approach to the excitonic properties in semiconductor quantum wells