title: How to import import org.apache.poi.ss.usermodel.Row error?
body: <p>I am tring to write data into Excel using Apache</p>
  
  <p>i refer this link:<a href="https://www.mkyong.com/java/apache-poi-reading-and-writing-excel-file-in-java/" rel="nofollow noreferrer">https://www.mkyong.com/java/apache-poi-reading-and-writing-excel-file-in-java/</a></p>
  
  <p><strong>Cell and Row are not Importing</strong></p>
  
  <p><a href="https://i.stack.imgur.com/85pi8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/85pi8.jpg" alt="Cell and Row are not Importing"></a></p>
  
  <p><strong>This my java class code:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/ILqbt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ILqbt.jpg" alt="enter image description here"></a></p>
  
  <p>I download <a href="https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml/3.9" rel="nofollow noreferrer">Apache jar file here</a></p>
  
  <p>MY java code below:</p>
  
  <pre><code> try {
              String FILE_NAME = "/tmp/MyFirstExcel.xlsx";
              XSSFWorkbook workbook = new XSSFWorkbook();
              XSSFSheet sheet = workbook.createSheet("Datatypes in Java");
              Object[][] datatypes = {
                                    {"Datatype", "Type", "Size(in bytes)"},
                                    {"int", "Primitive", 2},
                                    {"float", "Primitive", 4},
                                    {"double", "Primitive", 8},
                                    {"char", "Primitive", 1},
                                    {"String", "Non-Primitive", "No fixesize"}
                            };
                  int rowNum = 0;
                  System.out.println("Creating excel");
  
                            for (Object[] datatype : datatypes) {
                                Row row = sheet.createRow(rowNum++);
                                int colNum = 0;
                                for (Object field : datatype) {
                                    Cell cell = row.createCell(colNum++);
                                    if (field instanceof String) {
                                        cell.setCellValue((String) field);
                                    } else if (field instanceof Integer) {
                                        cell.setCellValue((Integer) field);
                                    }
                                }
                            }
                            FileOutputStream outputStream = new FileOutputStream(FILE_NAME);
                            workbook.write(outputStream);
                            workbook.close();
  
  
                        } catch (IOException e) {
                            e.printStackTrace();
                        }
  }
  </code></pre>
  
  <p><strong>Build.gridle</strong></p>
  
  <pre><code>dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      androidTestCompile 'com.android.support:support-annotations:26.+'
      compile 'com.android.support:appcompat-v7:26.+'
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      compile 'com.android.support:design:26.+'
      compile 'com.android.support:support-v4:26.+'
      compile 'com.squareup.retrofit2:retrofit:2.0.2'
      compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
      compile 'com.android.support:cardview-v7:25.2.0'
  
      testCompile 'junit:junit:4.12'
  }
  </code></pre>