Codota Logo
KCell.getValue
Code IndexAdd Codota to your IDE (free)

How to use
getValue
method
in
org.pentaho.di.core.spreadsheet.KCell

Best Java code snippets using org.pentaho.di.core.spreadsheet.KCell.getValue (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: pentaho/pentaho-kettle

@Test
public void testReadRowRA() throws Exception {
 KSheet sheet1 = getSampleSheet();
 KCell[] row = sheet1.getRow( 4 );
 assertEquals( "Three", row[ 1 ].getValue() );
 row = sheet1.getRow( 2 );
 assertEquals( "One", row[ 1 ].getValue() );
}
origin: pentaho/pentaho-kettle

@Test
public void testReadSameRow() throws Exception {
 KSheet sheet1 = getSampleSheet();
 KCell[] row = sheet1.getRow( 3 );
 assertEquals( "Two", row[ 1 ].getValue() );
 row = sheet1.getRow( 3 );
 assertEquals( "Two", row[ 1 ].getValue() );
}
origin: pentaho/pentaho-kettle

@Test
public void testReadCells() throws Exception {
 KSheet sheet = getSampleSheet();
 KCell cell = sheet.getCell( 1, 2 );
 assertEquals( "One", cell.getValue() );
 assertEquals( KCellType.LABEL, cell.getType() );
 cell = sheet.getCell( 2, 2 );
 assertEquals( KCellType.DATE, cell.getType() );
 assertEquals( new Date( 1283817600000L ), cell.getValue() );
 cell = sheet.getCell( 1, 3 );
 assertEquals( "Two", cell.getValue() );
 assertEquals( KCellType.LABEL, cell.getType() );
}
origin: pentaho/pentaho-kettle

@Test
public void testInlineString() throws Exception {
 final String sheetId = "1";
 final String sheetName = "Sheet 1";
 XSSFReader reader = mockXSSFReader( sheetId, SHEET_INLINE_STRINGS,
  mock( SharedStringsTable.class ),
  mock( StylesTable.class ) );
 StaxPoiSheet spSheet = new StaxPoiSheet( reader, sheetName, sheetId );
 KCell[] rowCells = spSheet.getRow( 0 );
 assertEquals( "Test1", rowCells[ 0 ].getValue() );
 assertEquals( KCellType.STRING_FORMULA, rowCells[ 0 ].getType() );
 assertEquals( "Test2", rowCells[ 1 ].getValue() );
 assertEquals( KCellType.STRING_FORMULA, rowCells[ 1 ].getType() );
 rowCells = spSheet.getRow( 1 );
 assertEquals( "value 1 1", rowCells[ 0 ].getValue() );
 assertEquals( KCellType.STRING_FORMULA, rowCells[ 0 ].getType() );
 assertEquals( "value 2 1", rowCells[ 1 ].getValue() );
 assertEquals( KCellType.STRING_FORMULA, rowCells[ 1 ].getType() );
 rowCells = spSheet.getRow( 2 );
 assertEquals( "value 1 2", rowCells[ 0 ].getValue() );
 assertEquals( KCellType.STRING_FORMULA, rowCells[ 0 ].getType() );
 assertEquals( "value 2 2", rowCells[ 1 ].getValue() );
 assertEquals( KCellType.STRING_FORMULA, rowCells[ 1 ].getType() );
}
origin: pentaho/pentaho-kettle

assertEquals( "One", row[ 1 ].getValue() );
assertEquals( KCellType.DATE, row[ 2 ].getType() );
assertEquals( new Date( 1283817600000L ), row[ 2 ].getValue() );
assertEquals( KCellType.NUMBER, row[ 3 ].getType() );
assertEquals( Double.valueOf( "75" ), row[ 3 ].getValue() );
assertEquals( KCellType.BOOLEAN, row[ 4 ].getType() );
assertEquals( Boolean.TRUE, row[ 4 ].getValue() );
assertEquals( KCellType.NUMBER_FORMULA, row[ 5 ].getType() );
assertEquals( Double.valueOf( "75" ), row[ 5 ].getValue() );
assertEquals( "Two", row[ 1 ].getValue() );
assertEquals( KCellType.DATE, row[ 2 ].getType() );
assertEquals( new Date( 1283904000000L ), row[ 2 ].getValue() );
assertEquals( KCellType.NUMBER, row[ 3 ].getType() );
assertEquals( Double.valueOf( "42" ), row[ 3 ].getValue() );
assertEquals( KCellType.BOOLEAN, row[ 4 ].getType() );
assertEquals( Boolean.FALSE, row[ 4 ].getValue() );
assertEquals( KCellType.NUMBER_FORMULA, row[ 5 ].getType() );
assertEquals( Double.valueOf( "117" ), row[ 5 ].getValue() );
assertEquals( "Three", row[ 1 ].getValue() );
assertEquals( KCellType.DATE, row[ 2 ].getType() );
assertEquals( new Date( 1283990400000L ), row[ 2 ].getValue() );
assertEquals( KCellType.NUMBER, row[ 3 ].getType() );
assertEquals( Double.valueOf( "93" ), row[ 3 ].getValue() );
assertEquals( KCellType.BOOLEAN, row[ 4 ].getType() );
assertEquals( Boolean.TRUE, row[ 4 ].getValue() );
assertEquals( KCellType.NUMBER_FORMULA, row[ 5 ].getType() );
assertEquals( Double.valueOf( "210" ), row[ 5 ].getValue() );
origin: pentaho/pentaho-kettle

@Test
public void testNoUsedRangeSpecified() throws Exception {
 final String sheetId = "1";
 final String sheetName = "Sheet 1";
 SharedStringsTable sharedStringsTableMock =
  mockSharedStringsTable( "Report ID", "Report ID", "Approval Status", "Total Report Amount", "Policy",
   "ReportIdValue_1", "ReportIdValue_1", "ApprovalStatusValue_1", "PolicyValue_1" );
 XSSFReader reader =
  mockXSSFReader( sheetId, SHEET_NO_USED_RANGE_SPECIFIED, sharedStringsTableMock, mock( StylesTable.class ) );
 StaxPoiSheet spSheet = new StaxPoiSheet( reader, sheetName, sheetId );
 // The first row is empty - it should have empty rowCells
 KCell[] rowCells = spSheet.getRow( 0 );
 assertEquals( 0, rowCells.length );
 // The second row - is the header - just skip it
 rowCells = spSheet.getRow( 1 );
 assertEquals( 0, rowCells.length );
 // The row3 - is the first row with data - validating it
 rowCells = spSheet.getRow( 2 );
 assertEquals( KCellType.LABEL, rowCells[ 0 ].getType() );
 assertEquals( "ReportIdValue_1", rowCells[ 0 ].getValue() );
 assertEquals( KCellType.LABEL, rowCells[ 1 ].getType() );
 assertEquals( "ReportIdValue_1", rowCells[ 1 ].getValue() );
 assertEquals( KCellType.LABEL, rowCells[ 2 ].getType() );
 assertEquals( "ApprovalStatusValue_1", rowCells[ 2 ].getValue() );
 assertEquals( KCellType.NUMBER, rowCells[ 3 ].getType() );
 assertEquals( 2623.0, rowCells[ 3 ].getValue() );
 assertEquals( KCellType.LABEL, rowCells[ 4 ].getType() );
 assertEquals( "PolicyValue_1", rowCells[ 4 ].getValue() );
}
origin: pentaho/pentaho-kettle

 r[rowcolumn] = cell.getValue();
 sourceMeta = data.valueMetaBoolean;
} else {
 if ( KCellType.DATE.equals( cellType ) || KCellType.DATE_FORMULA.equals( cellType ) ) {
  Date date = (Date) cell.getValue();
  long time = date.getTime();
  int offset = TimeZone.getDefault().getOffset( time );
 } else {
  if ( KCellType.LABEL == cellType || KCellType.STRING_FORMULA == cellType ) {
   String string = (String) cell.getValue();
   switch ( meta.getField()[rowcolumn].getTrimType() ) {
    case ExcelInputMeta.TYPE_TRIM_LEFT:
  } else {
   if ( KCellType.NUMBER == cellType || KCellType.NUMBER_FORMULA == cellType ) {
    r[rowcolumn] = cell.getValue();
    sourceMeta = data.valueMetaNumber;
   } else {
org.pentaho.di.core.spreadsheetKCellgetValue

Popular methods of KCell

  • getContents
  • getType
  • getRow

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JComboBox (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now