The Mamma Mia! and Billy Elliot star's condition was discovered 18 months ago, after doctors found two primary tumours in her large intestine.
The 69-year-old told the BBC's Victoria Derbyshire show that, following chemotherapy, she had been given the all-clear.
Dame Julie also hinted that her next film, an adaptation of Frances Hodgson Burnett's classic novel The Secret Garden, could be her last.
The veteran actress first visited a doctor with indigestion and "slight discomfort" but later returned with symptoms such as stomach pain, heartburn and vomiting.
She was referred to a gastric surgeon for a CT scan and later, while on the set of The Secret Garden, received a call asking her to go in.
Recalling the moment of her diagnosis, she said: "Shock. First of all, shock. And I thought 'Right'. Then you hold on to the positive which was that he said 'We can fix this'."
Dame Julie was diagnosed with stage three bowel cancer, which indicates the cancer has spread into nearby lymph nodes, and is one level below the most serious categorisation.
Dame Julie also remembered the moment she told her husband, Grant Roffey, the news.
"I'll never forget his face - tears came into his eyes," she said.
Despite remaining upbeat, Dame Julie said she thought "Well, I may not come round from the anaesthetic" while awaiting surgery.
She said she had "30cm taken out of my colon" in hospital.
Her recovery meant she had to be cut from some scenes in the forthcoming film The Secret Garden, where she stars alongside Colin Firth.
Dame Julie said she also missed the premiere of Mamma Mia! Here We Go Again, with her agent telling people she had a ruptured hernia in order to keep the cancer diagnosis secret.
Genevieve Edwards, chief executive of Bowel Cancer UK, said: "We are very sorry to hear Dame Julie has been treated for bowel cancer.
"We are incredibly grateful to her for speaking so openly about her diagnosis.
"It's only by talking publicly about this disease and raising awareness that we can encourage more people to take action if they have concerns.
"Every year in the UK, nearly 42,000 people are diagnosed with bowel cancer, making it the UK's fourth most common cancer killer.
"Being aware of the symptoms and visiting your GP if things don't feel right can help increase chances of an early diagnosis.
"If you or your loved one receive a free NHS bowel cancer screening test in the post, completing it could save your life."