Former News of the World royal editor Clive Goodman said Diana handed over the data after her separation from Charles, when she was going through a "very, very difficult time" and was looking for media support. Diana and Charles separated in 1992 and divorced four years later. She died in a Paris car crash in 1997.
Goodman said the 1992 phone directory that she sent to his newspaper office gave him numerous staff contacts and telephone numbers that were helpful in his reporting on the royal family.
"She told me she wanted me to see the scale of her husband's staff and household, compared with others," Goodman said. "She felt she was being swamped by people close to his household. She was looking for an ally to take him on - to show there were forces that would rage against him."
Goodman, 56, has been linked to the long-running phone hacking scandal since his first arrest in 2006 for suspected hacking into the voicemails of royal aides. He was briefly jailed in 2007. He is on trial now for two counts of alleged conspiracy to commit misconduct in a public office, which he denies.
Rupert Murdoch shut down the News of the World tabloid in 2011 after the scope of the phone hacking scandal became known. Dozens of people have been arrested in the scandal, including former top Murdoch executives, and his company has paid out millions in compensation to victims.