parameters: (self, filename)
docstring: Save .ods spreadsheet.
  
  		The save function saves the current cells and settings into a document.
docstring_summary: Save .ods spreadsheet.
docstring_tokens: Save . ods spreadsheet .
function: def save(self, filename):
  		"""Save .ods spreadsheet.
  
  		The save function saves the current cells and settings into a document.
  		"""
  		if self.debug: print "Writing %s" % filename
  		self.savefile = zipfile.ZipFile(filename, "w")
  		if self.debug: print "  meta.xml"
  		self._zip_insert(self.savefile, "meta.xml", self.meta.get_meta())
  		if self.debug: print "  mimetype"
  		self._zip_insert(self.savefile, "mimetype", "application/vnd.oasis.opendocument.spreadsheet")
  		if self.debug: print "  Configurations2/accelerator/current.xml"
  		self._zip_insert(self.savefile, "Configurations2/accelerator/current.xml", "")
  		if self.debug: print "  META-INF/manifest.xml"
  		self._zip_insert(self.savefile, "META-INF/manifest.xml", self._ods_manifest())
  		if self.debug: print "  content.xml"
  		self._zip_insert(self.savefile, "content.xml", self._ods_content())
  		if self.debug: print "  settings.xml"
  		self._zip_insert(self.savefile, "settings.xml", self._ods_settings())
  		if self.debug: print "  styles.xml"
  		self._zip_insert(self.savefile, "styles.xml", self._ods_styles())
  
  		# Add additional files if needed
  		for fileset in self.manifest_files:
  			(filename, filetype, newname) = fileset
  			# Read in the file
  			data = self._file_load(filename)
  			if self.debug: print "  Inserting '%s' as '%s'" % (filename, newname)
  			self._zip_insert_binary(self.savefile, newname, data)
function_tokens: def save ( self , filename ) : if self . debug : print "Writing %s" % filename self . savefile = zipfile . ZipFile ( filename , "w" ) if self . debug : print "  meta.xml" self . _zip_insert ( self . savefile , "meta.xml" , self . meta . get_meta ( ) ) if self . debug : print "  mimetype" self . _zip_insert ( self . savefile , "mimetype" , "application/vnd.oasis.opendocument.spreadsheet" ) if self . debug : print "  Configurations2/accelerator/current.xml" self . _zip_insert ( self . savefile , "Configurations2/accelerator/current.xml" , "" ) if self . debug : print "  META-INF/manifest.xml" self . _zip_insert ( self . savefile , "META-INF/manifest.xml" , self . _ods_manifest ( ) ) if self . debug : print "  content.xml" self . _zip_insert ( self . savefile , "content.xml" , self . _ods_content ( ) ) if self . debug : print "  settings.xml" self . _zip_insert ( self . savefile , "settings.xml" , self . _ods_settings ( ) ) if self . debug : print "  styles.xml" self . _zip_insert ( self . savefile , "styles.xml" , self . _ods_styles ( ) ) # Add additional files if needed for fileset in self . manifest_files : ( filename , filetype , newname ) = fileset # Read in the file data = self . _file_load ( filename ) if self . debug : print "  Inserting '%s' as '%s'" % ( filename , newname ) self . _zip_insert_binary ( self . savefile , newname , data )