Colin Halliday was jailed for two years over the offence at The Markets Post Office, New York Street, on August 27 this year.
Leeds Crown Court heard the 19-year-old victim was targeted as she tried to withdraw money from a cash machine inside the premises.
Bashir Ahmed, prosecuting, said the woman needed the money to pay a gardener for work he had done for her but she was having problems withdrawing the cash from the machine.
As she was using the machine Halliday approached her from the side, grabbed her by the arm and forced her out of the way.
Halliday then managed to withdraw £300 before leaving with the cash and the victim's bank card.
Halliday accused them of being liars. He denied taking the money and said he did not have the victim's bank card.
He was detained until police arrived and found in possession of the money and the bank card when he was searched.
The defendant spat in the police van as he was being taken to Elland Road police station.
He also spat in his cell while in custody.
Mr Ahmed said the spitting amounted to criminal damage because of the expense required to pay for expert cleaning due to coronavirus guidelines.
She also stated that the attack had made her feel "powerless" and she had suffered from anxiety at work.
Halliday, of Ferriby Towers, Lincoln Green, Leeds, pleaded guilty to robbery and criminal damage.
He has 94 previous convictions for 157 offences and was described in court as a "prolific shoplifter".
Anthony Sugare, mitigating, said Halliday was sorry for what he had done and pleaded guilty at an early stage.
Mr Sugare said his client had described how he had been " an idiot" for carrying out the robbery and committed the offence to fund his drug addiction.