original_docstring: 
      Generates an XLSX/ ZIP (of CSV files) file with the given data.
  
      - ``data`` is a queryset with two main properties ``pk`` and ``exporter_data``.
      - ``paths`` is a list with the allowed jsonpaths.
      - ``labels`` is a dictionary whose keys are the jsonpaths
        and the values the linked labels to use as header for that jsonpath.
      - ``format``, expected values ``xlsx`` or ``csv``.
      
docstring: Generates an XLSX/ ZIP (of CSV files) file with the given data.
docstring_tokens: Generates an XLSX / ZIP ( of CSV files ) file with the given data .
code: def generate_file(data, paths=[], labels={}, format='csv', filename='export', offset=0, limit=MAX_SIZE):
      '''
      Generates an XLSX/ ZIP (of CSV files) file with the given data.
  
      - ``data`` is a queryset with two main properties ``pk`` and ``exporter_data``.
      - ``paths`` is a list with the allowed jsonpaths.
      - ``labels`` is a dictionary whose keys are the jsonpaths
        and the values the linked labels to use as header for that jsonpath.
      - ``format``, expected values ``xlsx`` or ``csv``.
      '''
  
      csv_files = __generate_csv_files(data, paths, labels, offset, limit)
      if format == 'xlsx':
          return __prepare_xlsx(csv_files, filename)
      else:
          return __prepare_zip(csv_files, filename)
code_tokens: def generate_file ( data , paths = [ ] , labels = { } , format = 'csv' , filename = 'export' , offset = 0 , limit = MAX_SIZE ) : csv_files = __generate_csv_files ( data , paths , labels , offset , limit ) if format == 'xlsx' : return __prepare_xlsx ( csv_files , filename ) else : return __prepare_zip ( csv_files , filename )
short_docstring: Generates an XLSX/ ZIP (of CSV files) file with the given data.
short_docstring_tokens: Generates an XLSX / ZIP ( of CSV files ) file with the given data .
comment: '''
      Generates an XLSX/ ZIP (of CSV files) file with the given data.
  
      - ``data`` is a queryset with two main properties ``pk`` and ``exporter_data``.
      - ``paths`` is a list with the allowed jsonpaths.
      - ``labels`` is a dictionary whose keys are the jsonpaths
        and the values the linked labels to use as header for that jsonpath.
      - ``format``, expected values ``xlsx`` or ``csv``.
      '''