Delete a sheet from a book. If either isn't given, use the active one.
974441
def sheetDelete(book=None,sheet=None):
    
    if book is None:
        book=activeBook()
    if sheet in sheetNames():
        PyOrigin.WorksheetPages(book).Layers(sheetNames().index(sheet)).Destroy()
542302
def remove(self, document):
        
        assert '_id' in document, 'Document must have an id'
        self.db.execute("delete from %s where id = ?" % self.name, (document['_id'],))
1087638
def shred(args):
    
    p = OptionParser(shred.__doc__)
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    s, = args
    u = UnitigLayout(s)
    u.shred()
    u.print_to_file(inplace=True)
180451
def pull(self,bookName=None,sheetName=None):
        """"""

        # tons of validation
        if bookName is None and self.bookName: bookName=self.bookName
        if sheetName is None and self.sheetName: sheetName=self.sheetName
        if bookName is None: bookName=OR.activeBook()
        if bookName and sheetName is None: sheetName=OR.activeSheet()
        if not bookName or not sheetName:
            print("can't figure out where to pull from! [%s]%s"%(bookName,sheetName))
            return

        # finally doing the thing
        poSheet=OR.getSheet(bookName,sheetName)
        self.bookName=bookName
        self.sheetName=sheetName
        self.desc=poSheet.GetLongName()
        self.colNames=[poCol.GetName() for poCol in poSheet.Columns()]
        self.colDesc=[poCol.GetLongName() for poCol in poSheet.Columns()]
        self.colUnits=[poCol.GetUnits() for poCol in poSheet.Columns()]
        self.colComments=[poCol.GetComments() for poCol in poSheet.Columns()]
        self.colTypes=[poCol.GetType() for poCol in poSheet.Columns()]
        self.colData=[poCol.GetData() for poCol in poSheet.Columns()]
841640
def delete(cls, **kwargs):
        '''
        
        '''
        q = cls._get_instance(**kwargs)
        if q:
            _action_and_commit(q, session.delete)
1266133
def delete(self, _key) :
        ""
        try :
            doc = self.cacheStore[_key]
            doc.prev.nextDoc = doc.nextDoc
            doc.nextDoc.prev = doc.prev
            del(self.cacheStore[_key])
        except KeyError :
            raise KeyError("Document with _key %s is not available in cache" % _key)
342072
def push(self,bookName=None,sheetName=None,overwrite=False):
        """"""
        # tons of validation
        if bookName: self.bookName=bookName
        if sheetName: self.sheetName=sheetName
        if not self.sheetName in OR.sheetNames(bookName):
            print("can't find [%s]%s!"%(bookName,sheetName))
            return

        # clear out out sheet by deleting EVERY column
        poSheet=OR.getSheet(bookName,sheetName) # CPyWorksheetPageI
        if not poSheet:
            print("WARNING: didn't get posheet",poSheet,bookName,sheetName)
        for poCol in [x for x in poSheet if x.IsValid()]:
            poCol.Destroy()

        # create columns and assign properties to each
        for i in range(len(self.colNames)):
            poSheet.InsertCol(i,self.colNames[i])
            poSheet.Columns(i).SetName(self.colNames[i])
            poSheet.Columns(i).SetLongName(self.colDesc[i])
            poSheet.Columns(i).SetUnits(self.colUnits[i])
            poSheet.Columns(i).SetComments(self.colComments[i])
            poSheet.Columns(i).SetType(self.colTypes[i])
            poSheet.Columns(i).SetData(self.colData[i])
212622
def delete_cell(row_index = 0, column_index=0, shift=nil)
      validate_workbook
      validate_nonnegative(row_index)
      validate_nonnegative(column_index)

      row = sheet_data[row_index]
      old_cell = row && row[column_index]

      case shift
      when nil then
        row.cells[column_index] = nil if row
      when :left then
        row.delete_cell_shift_left(column_index) if row
      when :up then
        (row_index...(sheet_data.size - 1)).each { |index|
          old_row = sheet_data.rows[index + 1]
          if old_row.nil? then
            sheet_data.rows[index] = nil
          else
            new_row = sheet_data.rows[index] || add_row(index)
            c = new_row.cells[column_index] = old_row.cells[column_index]
            c.row = (index + 1) if c.is_a?(Cell)
          end
        }
      else
        raise 'invalid shift option'
      end

      return old_cell
    end
415798
static Workbook clearContent(final Workbook book) {
        ByteArrayOutputStream originalOut = new ByteArrayOutputStream();
        
        try { book.write(originalOut); }
        catch (IOException e) { throw new CalculationEngineException(e); }
        
        InputStream originalIn = new ByteArrayInputStream(copyOf(originalOut.toByteArray(), originalOut.size()));

        Workbook w = ConverterUtils.newWorkbook(originalIn);
        Sheet s = w.getSheetAt(0); //TODO: only one sheet is supported
        
        for (int i = s.getFirstRowNum(); i <= s.getLastRowNum(); i++) {
            Row r = s.getRow(i);
            if (r == null) { continue; }
            
            for (int j = r.getFirstCellNum(); j <= r.getLastCellNum(); j++) {
                Cell c = r.getCell(j);
                if (c == null) { continue; }
                
                c.setCellType(CELL_TYPE_BLANK);
            }
        }
        
        return w;
    }
102277
def removeSheet(self, vs):
        ''
        self.rows = [r for r in self.rows if r.sheet != vs.name]
        status('removed "%s" from cmdlog' % vs.name)
1194375
def delete(bad_entry):
    
    entries = read()
    kept_entries = [x for x in entries if x.rstrip() != bad_entry]
    write(kept_entries)
47134
def deletePage(self, pno = -1):
        
        pl = list(range(len(self)))
        if pno < -1 or pno > pl[-1]:
            raise ValueError("page number out of range")
        if pno >= 0:
            pl.remove(pno)
        else:
            pl.remove(pl[-1])
        return self.select(pl)
639110
def delete_one(self, *args, **kwargs):
        
        result = self.collection.delete_one(*args, **kwargs)
        return result.raw_result
192118
def delete(self):
        
        if self.abstract:
            raise AbstractDocumentException()

        self._api.delete_document(self.id)
        self._id = None

        return True
405254
def close_tab(self, *args):
        
        prompt_cfg = self.settings.general.get_int('prompt-on-close-tab')
        self.get_notebook().delete_page_current(prompt=prompt_cfg)
1255679
def delete(self):
        """"""
        if self._sheet.readonly:
            raise ReadOnlyException
        gd_client = self._sheet.client
        assert gd_client is not None
        return gd_client.DeleteRow(self._entry)
1081670
def delete(self, page ):
        ''''''
        if self.readonlytest:
            print 'Redmine read only test: Pretending to delete: ' + page
        else:
            return self.open( page, HTTPrequest=self.DELETE_Request )