You will need to make some changes to it so that it exactly does what you want it to, but the basic building blocks are here and should be easy to configure.
/* Create a table and draw it on a PDF */
// Set the page size of the new document
QP.SetPageSize("Letter");
// Create the table and specify the number of rows and columns
tableID = QP.CreateTable(5, 5);
// Specify color and width of borders
QP.SetTableBorderColor(tableID, 0, 0.3, 0.204, 0);
QP.SetTableBorderWidth(tableID, 0, 0.2);
// Specify table row height and table column width
QP.SetTableRowHeight(tableID, 1, 5, 0);
QP.SetTableColumnWidth(tableID, 1, 5, 100);
// Specify a background color for the column headers
QP.SetTableCellBackgroundColor(tableID, 1, 1, 1, 5, 0.3, 0.7, 1.0);
QP.SetTableCellAlignment(tableID, 1, 1, 1, 5, 4);
// Setup the column headers and content for the first row
QP.SetTableCellContent(tableID, 1, 1, "<b>This Week</b>");
QP.SetTableCellContent(tableID, 1, 2, "<b>Last Week</b>");
QP.SetTableCellContent(tableID, 1, 3, "<b>Artist Name</b>");
QP.SetTableCellContent(tableID, 1, 4, "<b>Peak</b>");
QP.SetTableCellContent(tableID, 1, 5, "<b>Weeks On</b>");
// Insert the content for the second row
QP.SetTableCellContent(tableID, 2, 1, "1");
QP.SetTableCellContent(tableID, 2, 2, "1");
QP.SetTableCellContent(tableID, 2, 3, "<b>The Black Eyed Peas</b><br>Boom Boom Pow");
QP.SetTableCellContent(tableID, 2, 4, "<b>1</b>");
QP.SetTableCellContent(tableID, 2, 5, "<b>11</b>");
// Insert the content for the third row
QP.SetTableCellContent(tableID, 3, 1, "2");
QP.SetTableCellContent(tableID, 3, 2, "3");
QP.SetTableCellContent(tableID, 3, 3, "<b>Missy Higgins</b><br>Life is a rainbow");
QP.SetTableCellContent(tableID, 3, 4, "<b>2</b>");
QP.SetTableCellContent(tableID, 3, 5, "<b>8</b>");
// Insert the content for the fourth row
QP.SetTableCellContent(tableID, 4, 1, "3");
QP.SetTableCellContent(tableID, 4, 2, "2");
QP.SetTableCellContent(tableID, 4, 3, "<b>Silverchair</b><br>The Door");
QP.SetTableCellContent(tableID, 4, 4, "<b>3</b>");
QP.SetTableCellContent(tableID, 4, 5, "<b>7</b>");
// Insert the content for the fourth row
QP.SetTableCellContent(tableID, 5, 1, "4");
QP.SetTableCellContent(tableID, 5, 2, "4");
QP.SetTableCellContent(tableID, 5, 3, "<b>Rolling Stones</b><br>Sweet Virginia");
QP.SetTableCellContent(tableID, 5, 4, "<b>4</b>");
QP.SetTableCellContent(tableID, 5, 5, "<b>19</b>");
// Draw the table onto the document
QP.SetOrigin(1);
QP.DrawTableRows(tableID, 50, 50, 400, 1, 0);
// Save the document to disk
QP.SaveToFile("table.pdf");