A priest is someone who received the Sacrament of the Holy Orders. If a priest is excommunicated, first of all he is
suspended, that is, the Church revokes his priestly authority.
Now the issue is that a priest - even one in “good standing

” has
no power or ability of his own: it is the Holy Spirit who, out of His own will, makes the miracle of Transubstantiation take place.
A validly ordained priest, as you may know, is acting
in persona Christi, which means that at the moment of Consecration
it is Jesus Christ Himself who is pronouncing the blessing and praying the Holy Spirit to come upon the pure gifts.
Remember that the Church is ruled by the successor of s. Peter. To Peter the Lord said:
Truly, I say to you, whatever you bind on earth shall be bound in heaven, and whatever you loose on earth shall be loosed in heaven.
The moment that a priest is not validly ordained by the Church, or the Church suspended him, the extraordinary miracle of Holy Mass - the Sacrifice, Death, and Resurrection of Christ taking place before our eyes as if we were on Calvary with the Blessed Virgin and St. John - will not take place. At that time, the priest still shares in the
common priesthood like the lay faithful, but he may not give blessings, much less celebrate Holy Mass.
On top of that, if a priest is suspended or excommunicated, it is a sacrilege to attempt to celebrate the Holy Mass. All he should be doing is
attending Holy Mass on Sundays and days of obligation - for he is still bound to the duties of a Catholic.