Use Sheet as param instead of XSSFSheet
Initialize array of pivottables when workbook created instead of when reading each sheet