def parts
      parts = [
       {:entry => RELS_PN, :doc => relationships, :schema => RELS_XSD},
       {:entry => "xl/#{STYLES_PN}", :doc => workbook.styles, :schema => SML_XSD},
       {:entry => CORE_PN, :doc => @core, :schema => CORE_XSD},
       {:entry => APP_PN, :doc => @app, :schema => APP_XSD},
       {:entry => WORKBOOK_RELS_PN, :doc => workbook.relationships, :schema => RELS_XSD},
       {:entry => CONTENT_TYPES_PN, :doc => content_types, :schema => CONTENT_TYPES_XSD},
       {:entry => WORKBOOK_PN, :doc => workbook, :schema => SML_XSD}
      ]

      workbook.drawings.each do |drawing|
        parts << {:entry => "xl/#{drawing.rels_pn}", :doc => drawing.relationships, :schema => RELS_XSD}
        parts << {:entry => "xl/#{drawing.pn}", :doc => drawing, :schema => DRAWING_XSD}
      end


      workbook.tables.each do |table|
        parts << {:entry => "xl/#{table.pn}", :doc => table, :schema => SML_XSD}
      end
      workbook.pivot_tables.each do |pivot_table|
        cache_definition = pivot_table.cache_definition
        parts << {:entry => "xl/#{pivot_table.rels_pn}", :doc => pivot_table.relationships, :schema => RELS_XSD}
        parts << {:entry => "xl/#{pivot_table.pn}", :doc => pivot_table} #, :schema => SML_XSD}
        parts << {:entry => "xl/#{cache_definition.pn}", :doc => cache_definition} #, :schema => SML_XSD}
      end

      workbook.comments.each do|comment|
        if comment.size > 0
          parts << { :entry => "xl/#{comment.pn}", :doc => comment, :schema => SML_XSD }
          parts << { :entry => "xl/#{comment.vml_drawing.pn}", :doc => comment.vml_drawing, :schema => nil }
        end
      end

      workbook.charts.each do |chart|
        parts << {:entry => "xl/#{chart.pn}", :doc => chart, :schema => DRAWING_XSD}
      end

      workbook.images.each do |image|
        parts << {:entry => "xl/#{image.pn}", :path => image.image_src}
      end

      if use_shared_strings
        parts << {:entry => "xl/#{SHARED_STRINGS_PN}", :doc => workbook.shared_strings, :schema => SML_XSD}
      end

      workbook.worksheets.each do |sheet|
        parts << {:entry => "xl/#{sheet.rels_pn}", :doc => sheet.relationships, :schema => RELS_XSD}
        parts << {:entry => "xl/#{sheet.pn}", :doc => sheet, :schema => SML_XSD}
      end

      # Sort parts for correct MIME detection
      parts.sort_by { |part| part[:entry] }
    end
def parts
      parts = [
       {:entry => RELS_PN, :doc => relationships, :schema => RELS_XSD},
       {:entry => "xl/#{STYLES_PN}", :doc => workbook.styles, :schema => SML_XSD},
       {:entry => CORE_PN, :doc => @core, :schema => CORE_XSD},
       {:entry => APP_PN, :doc => @app, :schema => APP_XSD},
       {:entry => WORKBOOK_RELS_PN, :doc => workbook.relationships, :schema => RELS_XSD},
       {:entry => CONTENT_TYPES_PN, :doc => content_types, :schema => CONTENT_TYPES_XSD},
       {:entry => WORKBOOK_PN, :doc => workbook, :schema => SML_XSD}
      ]

      workbook.drawings.each do |drawing|
        parts << {:entry => "xl/#{drawing.rels_pn}", :doc => drawing.relationships, :schema => RELS_XSD}
        parts << {:entry => "xl/#{drawing.pn}", :doc => drawing, :schema => DRAWING_XSD}
      end


      workbook.tables.each do |table|
        parts << {:entry => "xl/#{table.pn}", :doc => table, :schema => SML_XSD}
      end
      workbook.pivot_tables.each do |pivot_table|
        cache_definition = pivot_table.cache_definition
        parts << {:entry => "xl/#{pivot_table.rels_pn}", :doc => pivot_table.relationships, :schema => RELS_XSD}
        parts << {:entry => "xl/#{pivot_table.pn}", :doc => pivot_table} #, :schema => SML_XSD}
        parts << {:entry => "xl/#{cache_definition.pn}", :doc => cache_definition} #, :schema => SML_XSD}
      end

      workbook.comments.each do|comment|
        if comment.size > 0
          parts << { :entry => "xl/#{comment.pn}", :doc => comment, :schema => SML_XSD }
          parts << { :entry => "xl/#{comment.vml_drawing.pn}", :doc => comment.vml_drawing, :schema => nil }
        end
      end

      workbook.charts.each do |chart|
        parts << {:entry => "xl/#{chart.pn}", :doc => chart, :schema => DRAWING_XSD}
      end

      workbook.images.each do |image|
        parts << {:entry => "xl/#{image.pn}", :path => image.image_src}
      end

      if use_shared_strings
        parts << {:entry => "xl/#{SHARED_STRINGS_PN}", :doc => workbook.shared_strings, :schema => SML_XSD}
      end

      workbook.worksheets.each do |sheet|
        parts << {:entry => "xl/#{sheet.rels_pn}", :doc => sheet.relationships, :schema => RELS_XSD}
        parts << {:entry => "xl/#{sheet.pn}", :doc => sheet, :schema => SML_XSD}
      end

      # Sort parts for correct MIME detection
      parts.sort_by { |part| part[:entry] }
    end
The parts of a package
 @return [Array] An array of hashes that define the entry, document and schema for each part of the package.
 @private