Who was the King of Spain before Juan Carlos?

Alfonso XIII was King of Spain from 1886 to 1931. He was Juan Carlos' I grandfather.