Dame Judi Dench was devastated when she was told Skyfall would be her last James Bond film, but she "put on a brave face" for her family and friends to keep the plot twist secret.

The veteran actress played spy chief M in six 007 blockbusters before her character was killed off in her seventh film, last year's (12) Skyfall, and Dench now reveals she was completely blindsided when producers told her the bad news.

She was informed of M's demise in a meeting with producer Barbara Broccoli and co-star Daniel Craig, but couldn't let anyone know how upset she was as Bond bosses were determined stop the storyline leaking before the film hit cinemas.

She tells British Tv host Graham Norton, "I knew about it for quite a while before (the shoot). I went and saw Barbara Broccoli and Daniel Craig, which I thought was a nice chance meeting to have a cup of coffee, but it was straight in my face. It wasn't broken to me gently. I put a very brave face on it and didn't tell anyone at all. People would ask, 'How's it going?' and I'd say, 'Fine' and then, 'Are you enjoying filming?' and I'd say, 'It's fine,' and, 'Do you get out from behind the desk, and I'd say, 'Yep.' It was quite hard, but it was worth keeping the secret."

Dench also reveals the cast and crew marked her exit from the franchise by giving her a surprise. She adds, "There was a big cake. I don't remember what it said on it!"

The interview airs in the U.K. on The Graham Norton Show on Friday (01Mar13).