Automatic insertion of solar cells