Creates a new sheet with the given name.

        If an optional index argument is not provided then the created
        sheet is appended at the end. Returns the new sheet.
167756
def create(self, name, index=None):
        
        if index is None:
            index = len(self)
        self._create(name, index)
        return self[name]
1146841
def new(self, name):
        
        #XXX:dc: assert that the name is somewhat sane and follows python
        # naming conventions
        next_id = 0
        cls_name = '_'.join((name, next_id))
        with open(pjoin(self.migration_home, name), "w+") as new_migration:
            print >> new_migration, migration_tmpl.format(
                cls_name=cls_name, migration_name=name)
1145642
public IndexOutput createOutput(String name) throws IOException {
    Path file = new Path(directory, name);
    if (fs.exists(file) && !fs.delete(file)) {
      // delete the existing one if applicable
      throw new IOException("Cannot overwrite index file " + file);
    }

    return new FileSystemIndexOutput(file, ioFileBufferSize);
  }
935692
function makeSheet(scope) {
  var style = document.createElement('style');
  document.head.appendChild(style);
  var sheet = style.sheet;

  if (scope) {
    style.setAttribute('scoped', "scoped");
    if (!scopedSupported) {
      scope.dataset[scopedStyleIdsProp] = (scope.dataset[scopedStyleIdsProp] || "") + " " +
        (sheet.scopedStyleId = makeScopedStyleId(scopedStyleId++));
    }
  }

  return sheet;
}
856031
public static Row getOrCreateRow(Sheet sheet, int rowIndex) {
		Row row = sheet.getRow(rowIndex);
		if (null == row) {
			row = sheet.createRow(rowIndex);
		}
		return row;
	}
723398
public function setIndexByName($sheetName, $newIndex)
    {
        $oldIndex = $this->getIndex($this->getSheetByName($sheetName));
        $pSheet = array_splice(
            $this->workSheetCollection,
            $oldIndex,
            1
        );
        array_splice(
            $this->workSheetCollection,
            $newIndex,
            0,
            $pSheet
        );
        return $newIndex;
    }
192880
def create_page(pagename):
    
    page = pagename.lstrip("/").rstrip("/")
    _, _ext = os.path.splitext(pagename)

    # If the file doesn't have an extension, we'll just create one
    if not _ext or _ext == "":
        page += ".jade"

    if not page.endswith(PAGE_FORMAT):
        error("Can't create '%s'" % page)
        print("Invalid filename format")
        print("Filename must be in: '%s'" % " | ".join(PAGE_FORMAT))
    else:
        engine = Yass(CWD)
        markup = "jade"
        if page.endswith(".md"):
            markup = "md"
        if page.endswith(".html"):
            markup = "html"

        dest_file = os.path.join(engine.pages_dir, page)
        dest_dir = os.path.dirname(dest_file)

        content = TPL_HEADER
        content += TPL_BODY[markup]

        if os.path.isfile(dest_file):
            error("File exists already")
            print("Location: %s" % dest_file)

        else:
            if not os.path.isdir(dest_dir):
                os.makedirs(dest_dir)
            with open(dest_file, "w") as f:
                f.write(content)

            print("New page created: '%s'" % page)
            print("Location: %s" % dest_file)


    footer()
1214441
public static void createNewRow(SheetTemplate template) {
        if (template.lastRowIndex > template.currentRowIndex && template.currentRowIndex != template.initRowIndex) {
            template.sheet.shiftRows(template.currentRowIndex, template.lastRowIndex, 1, true, true);
            template.lastRowIndex++;
        }
        template.currentRow = template.sheet.createRow(template.currentRowIndex);
        template.currentRow.setHeightInPoints(template.rowHeight);
        template.currentRowIndex++;
        template.currentColumnIndex = template.initColumnIndex;
    }
844888
@Override
    public XlsWorksheet getSheet(String name)
    {
        XlsWorksheet ret = null;
        if(workbook != null)
        {
            Sheet sheet = workbook.getSheet(name);
            if(sheet != null)
                ret = new XlsWorksheet(sheet);
        }
        else if(writableWorkbook != null)
        {
            Sheet sheet = writableWorkbook.getSheet(name);
            if(sheet != null)
                ret = new XlsWorksheet(sheet);
        }
        return ret;
    }
1124960
public List<String> getAllSheetNames() {
    List<String> sheets = newArrayList();
    for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
      sheets.add(workbook.getSheetName(i));
    }
    return sheets;
  }
478472
def create(name, options = {})
            last_slash = name.rindex("/")
            category = name[0 ... last_slash]
            plugin = name[last_slash .. -1]

            map = @plugins[category]
            if not map
                raise "Plugin category #{category} does not exist"
            elsif not map.has_key? plugin
                raise "Plugin #{plugin} does not exist in category #{category}"
            else
                map[plugin].new(options)
            end
        end
674400
public XceliteSheet getSheet(int sheetIndex) {
    Sheet sheet = workbook.getSheetAt(sheetIndex);
    if (sheet == null) {
      throw new XceliteException(String.format("Could not find sheet at index %s", sheetIndex));
    }
    return new XceliteSheetImpl(sheet, file);
  }
595396
public Writer sheet(String sheetName) {
        if (StringUtil.isEmpty(sheetName)) {
            throw new IllegalArgumentException("sheet cannot be empty");
        }
        this.sheetName = sheetName;
        return this;
    }
220348
def create_window(self, pane, name=None, set_active=True):
        
        assert isinstance(pane, Pane)
        assert name is None or isinstance(name, six.text_type)

        # Take the first available index.
        taken_indexes = [w.index for w in self.windows]

        index = self.base_index
        while index in taken_indexes:
            index += 1

        # Create new window and add it.
        w = Window(index)
        w.add_pane(pane)
        self.windows.append(w)

        # Sort windows by index.
        self.windows = sorted(self.windows, key=lambda w: w.index)

        app = get_app(return_none=True)

        if app is not None and set_active:
            self.set_active_window(w)

        if name is not None:
            w.chosen_name = name

        assert w.active_pane == pane
        assert w._get_parent(pane)
800453
public Optional<SheetBindingErrors<P>> getBySheetName(final String sheetName) {
        return list.stream()
                .filter(b -> Utils.equals(b.getSheetName(), sheetName))
                .findFirst();
    }
682830
def add(name):
    
    item = AssetClass()
    item.name = name
    app = AppAggregate()
    app.create_asset_class(item)

    print(f"Asset class {name} created.")
396740
def add_worksheet(name = nil)
      if name.nil? then
        n = 0

        begin
          name = SHEET_NAME_TEMPLATE % (n += 1)
        end until self[name].nil?
      end

      new_worksheet = Worksheet.new(:workbook => self, :sheet_name => name)
      worksheets << new_worksheet
      new_worksheet
    end