Tags » Poi

Poi oh poi

Another box checked off the “try this and find out what it’s all about” list.

Hey, they aren’t all bad. I find I love kimchee. It does have a smell like something gone off, but it has nothing of that not-food taste I find in most vegetables, and especially none of the revolting cloy characteristic of cole slaw. 698 more words

Adventures

Pokeball Poi

So someone with more time and patience could follow a pattern and do this beautifully…

I, however, have opted to do my usual jazz crochet, improvised… but without the skill of an accomplished jazz musician. 30 more words

Boredom

POI read cell value as string

When you get error for reading cell value as string:

Cannot get a numeric value from a text cell
or Cannot get a boolean value from a text cell… 28 more words

Java

Poi Class: Opposite Direction, Mixed Level, Starts 3/25

Have you ever felt like your same direction repertoire is more extensive than your opposite direction moves? If so, this course is for you. This four-week series focuses on working in opposite direction on the front, back, side, floor and ceiling planes with various moves including: 382 more words

Classes

Savage Hippie Episode 38 - We Could All Use a Good Purging Every Now and Then

Pffft… I just don’t know… I shouldn’t talk about it, but I guess I’m gonna because I don’t have anything else to write here. I guess the rule of thumb is that, when someone says, “I’m comfortable with MY manhood”, that’s probably a good sign that this person is not comfortable with his manhood. 400 more words

Podcast

Beginner Dance Wednesday May 10, 8 PM

Develop transitions and beginner performance theory in this 4 week dance series. This class is the perfect follow up to the Beginner Moves class (or equivalent material: pinwheels, windmills, chasing the sun, butterflies and weaves). 656 more words

Classes

How to copy a row from existing excel sheet to a new excel sheet using Apache POI

source :http://stackoverflow.com/questions/22627691/how-to-copy-a-row-from-existing-excel-sheet-to-a-new-excel-sheet-using-apache-po

  public class RowCopy {

public static void main(String[] args) throws Exception{
    HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream("c:/input.xls"));
    HSSFSheet sheet = workbook.getSheet("Sheet1");
    copyRow(workbook, sheet, 0, 1);
    FileOutputStream out = new FileOutputStream("c:/output.xls");
    workbook.write(out);
    out.close();
}

private static void copyRow(HSSFWorkbook workbook, HSSFSheet worksheet, int sourceRowNum, int destinationRowNum) {
    // Get the source / new row
    HSSFRow newRow = worksheet.getRow(destinationRowNum);
    HSSFRow sourceRow = worksheet.getRow(sourceRowNum);

    // If the row exist in destination, push down all rows by 1 else create a new row
    if (newRow != null) {
        worksheet.shiftRows(destinationRowNum, worksheet.getLastRowNum(), 1);
    } else {
        newRow = worksheet.createRow(destinationRowNum);
    }

    // Loop through source columns to add to new row
    for (int i = 0; i < sourceRow.getLastCellNum(); i++) {
        // Grab a copy of the old/new cell
        HSSFCell oldCell = sourceRow.getCell(i);
        HSSFCell newCell = newRow.createCell(i);

        // If the old cell is null jump to next cell
        if (oldCell == null) {
            newCell = null;
            continue;
        }

        // Copy style from old cell and apply to new cell
        HSSFCellStyle newCellStyle = workbook.createCellStyle();
        newCellStyle.cloneStyleFrom(oldCell.getCellStyle());
        ;
        newCell.setCellStyle(newCellStyle);

        // If there is a cell comment, copy
        if (oldCell.getCellComment() != null) {
            newCell.setCellComment(oldCell.getCellComment());
        }

        // If there is a cell hyperlink, copy
        if (oldCell.getHyperlink() != null) {
            newCell.setHyperlink(oldCell.getHyperlink());
        }

        // Set the cell data type
        newCell.setCellType(oldCell.getCellType());

        // Set the cell data value
        switch (oldCell.getCellType()) {
            case Cell.CELL_TYPE_BLANK:
                newCell.setCellValue(oldCell.getStringCellValue());
                break;
            case Cell.CELL_TYPE_BOOLEAN:
                newCell.setCellValue(oldCell.getBooleanCellValue());
                break;
            case Cell.CELL_TYPE_ERROR:
                newCell.setCellErrorValue(oldCell.getErrorCellValue());
                break;
            case Cell.CELL_TYPE_FORMULA:
                newCell.setCellFormula(oldCell.getCellFormula());
                break;
            case Cell.CELL_TYPE_NUMERIC:
                newCell.setCellValue(oldCell.getNumericCellValue());
                break;
            case Cell.CELL_TYPE_STRING:
                newCell.setCellValue(oldCell.getRichStringCellValue());
                break;
        }
    }
POI