[1] Viljoen made his first-class debut for Namibia in the CSA Provincial Three-Day Challenge competition held in South Africa on 21 January 2010 against KwaZulu-Natal.
[7] A side made up of some of the leading players from Associate and Affiliate teams was put together to face England in Dubai in January 2012.
[8] Coming in to bat at 90/6, Viljoen top-scored with 98 runs from 189 balls against a bowling line-up including James Anderson, Stuart Broad, Steven Finn, and Graeme Swann.
[10] With 14 wickets from 9 matches, Viljoen was Namibia's leading wicket-taker in the tournament (equal fourth overall),[11] and scored 48 runs from 5 innings.
[18] In May 2019, he was named in Namibia's squad for the Regional Finals of the 2018–19 ICC T20 World Cup Africa Qualifier tournament in Uganda.
[26][27] In September 2019, he was named in Namibia's squad for the 2019 ICC T20 World Cup Qualifier tournament in the United Arab Emirates.