Table tennis competitions at the 2007 Pan American Games in Rio de Janeiro were held in July 2007 at the Riocentro Sports Complex .