Office buildings with low occupancy rates are being transformed into flats.