Mr Sarkozy denies any wrongdoing and is expected to appeal against the ruling.