code: public function getFilename($filename, $extension = 'xlsx')
      {
          $originalExtension = pathinfo($filename, PATHINFO_EXTENSION);
  
          return $this->getTemporaryFolder() . '/' . str_replace('.' . $originalExtension, '.' . $extension, basename($filename));
      }
docs: Returns the filename that should be used for sample output.
  
  @param string $filename
  @param string $extension
  
  @return string