I've excel sheet of only two columns. The user add y himself and the third one is for checking if the other two columns are valid to insert in he database or not.
While I'm trying to write in the third column after checking the processing going good for couple of rows but if there are more rows, the results for the third column for each row is not correct...
I think the problem here in the for loop if anyone can help it would be really appreciated. Thanks.
here's my code:- ...
#CheckMethodAuthority("PFV2300&limt_print")
public static void importExcel(Upload upload_data) throws IOException,
NoSuchFieldException, SecurityException, IllegalArgumentException,
IllegalAccessException,
ParseException {
String fileName = upload_data.getFileName();
logger.info("H1:" + fileName);
final int expectedSheetIndex = 0; //
Sheet sheet = ExcelUtil.openWorkSheet(new ByteArrayInputStream(upload_data.asBytes()), fileName, expectedSheetIndex);
SYS4000 account = (SYS4000)renderArgs.get("account");
StringBuffer fileUploadErrorMsg = new StringBuffer();
final int expectedTitleRowNum = 1; //
List<POS20083> pos20083List = readAllCellsOfSheet(sheet, expectedTitleRowNum, account.user_no, fileUploadErrorMsg);
int addItem =0;
int upItem =0;
int failItem =0;
File filePath = new File("D:\\play framework workspace\\Coupon_Platform\\public\\sample\\excel\\PFV2300-sample.xlsx");
InputStream file = new FileInputStream(filePath);
XSSFWorkbook WB = new XSSFWorkbook(file);
sheet = WB.getSheetAt(0);
for (POS20083 POS20083: pos20083List)
{
for (int i=0; i<=pos20083List.size(); i++)
{
Row row = sheet.getRow(i);
Cell cell_store_no= (sheet.getRow(i).getCell(0));
Cell cell_control_qty = (sheet.getRow(i).getCell(1));
Cell cell_error_msg = sheet.getRow(i).getCell(2);
sheet.autoSizeColumn(2);
for (int j=0; j<=sheet.getFirstRowNum(); j++)
{
if (row == null)
{
row = sheet.createRow(i);
continue;
}
if (cell_error_msg == null)
{
cell_error_msg = sheet.getRow(i).createCell(2);
continue;
}
if (row.getRowNum()==0)
{
continue;
}
POS20083 pos20083 = POS20083.find("merchant_no= ? and store_no= ?",POS20083.merchant_no, POS20083.store_no).first();
String sql = insert into pos20083 (pos20081_id, merchant_no, store_no, control_qty, id)select 60, ?1, ?2, ?3, pos20083_seq.nextval from dual;
String sql2 = " Select count(store_no) from twc_store"
+ " Where exists (select store_no"
+ " from pos20083"
+ " where twc_store.store_no = ?4)";
String sql3 = " Select count(store_no) from pos20083"
+ " Where exists (select store_no"
+ " from twc_store"
+ " where pos20083.store_no = ?5)";
EntityManager entityManager = JPA.em();
EntityTransaction transaction = JPA.em().getTransaction();
Query query = entityManager.createNativeQuery(sql);
Query query2 = entityManager.createNativeQuery(sql2);
Query query3 = entityManager.createNativeQuery(sql3);
query2.setParameter(4, POS20083.store_no);
query3.setParameter(5, POS20083.store_no);
if (!transaction.isActive())
{
transaction.begin();
}
int insertCount2 = query2.executeUpdate();
int insertCount3 = query3.executeUpdate();
int storeCounts = ObjectUtil.getInteger(query2.getSingleResult());
int storeCounts_pos20083 = ObjectUtil.getInteger(query3.getSingleResult());
if (storeCounts == 0 && ObjectUtil.getInteger(cell_control_qty.getNumericCellValue()) >0)
{
cell_error_msg.setCellValue("Store Number ID doesn't exists in [twc_store]");
sheet.autoSizeColumn(2);
}
if (storeCounts == 0 && ObjectUtil.getInteger(cell_control_qty.getNumericCellValue()) <=0)
{
cell_error_msg.setCellValue("Store Number ID doesn't exists in [twc_store] and and control Quantity coudn't be less or equal ZERO");
sheet.autoSizeColumn(2);
}
if (storeCounts == 1 && storeCounts_pos20083 ==0 && ObjectUtil.getInteger(cell_control_qty.getNumericCellValue()) > 0)
{
query.setParameter(1, POS20083.merchant_no);
query.setParameter(2, POS20083.store_no);
query.setParameter(3, POS20083.control_qty);
int insertCount = query.executeUpdate();
addItem++;
cell_error_msg.setCellValue(" ");
sheet.autoSizeColumn(2);
}
if (transaction.isActive())
{
transaction.commit();
}
file.close();
if (storeCounts == 1 && storeCounts_pos20083 ==0 && ObjectUtil.getInteger(cell_control_qty.getNumericCellValue()) <=0)
{
cell_error_msg.setCellValue("control Quantity coudnot be less or equal ZERO");
sheet.autoSizeColumn(2);
//failItem++;
//file.close();
}
if (storeCounts == 1 && storeCounts_pos20083 ==1 && ObjectUtil.getInteger(cell_control_qty.getNumericCellValue()) <=0)
{
cell_error_msg.setCellValue("Store Number ID already exists and control Quantity coudn't be less or equal ZERO");
sheet.autoSizeColumn(2);
}
if (storeCounts == 1 && storeCounts_pos20083 ==1 && ObjectUtil.getInteger(cell_control_qty.getNumericCellValue()) > 0)
{
cell_error_msg.setCellValue("Store Number ID already exists");
sheet.autoSizeColumn(2);
}
}
}
failItem++;
}
file.close();
FileOutputStream fileout = new FileOutputStream(filePath);
WB.write(fileout);
fileout.flush();
fileout.close();
I've found out the bug and i fixed it
there are was three loops
1- for (POS20083 POS20083: pos20083List)
2- for (int i=0; i<=pos20083List.size(); i++)
3- for (int j=0; j<=sheet.getFirstRowNum(); j++)
so if we remove the first one which isn't useful here because we are getting the data always from the excel sheet so it will works good ...
also the same for the third one too as well its not very useful here in my task too as well ...
so what i need is only the this loop
for (int i=0; i<=pos20083List.size(); i++)
and we can replace the pos20083list which was return the real number of row with this line
int rows = sheet.getPhisicalNumberofRows() - 1
Thanks so much Layne Bernardo for your efforts
Related
I want to write data into excel(.xlsx file) using Apache poi. but getting some error while writing a data. I have followed this video " How to read/write data from Excel file using Apache POI API in Selenium || Latest POI Version", I m able to read data but while writing I m getting this error " Cannot invoke "org.apache.poi.xssf.usermodel.XSSFCell.getStringCellValue()" because the return value of "org.apache.poi.xssf.usermodel.XSSFRow.getCell(int)" is null ", basically nullpointerexception.
enter code here
String resourceGroupNameElement = driver.findElement(By.xpath(FrameworkValidator_Constants.Constants.RESOURCE_GROUP_NAME_XPATH)).getText();
String expectedResult = reader.getCellData("RG",6,2);
if( resourceGroupNameElement== expectedResult) {
String status= "pass";
System.out.println(status);
}
else {
String status="fail";
System.out.println(status);
}
//reader.setCellData("RG", "STATUS/PASS/FAIL", 2, status);
System.out.println(status);
reader.setCellData("RG","ACTUAL RESULT" , 2, resourceGroupNameElement);
Assert.assertEquals(resourceGroupNameElement, expectedResult);
#######
It is showing error in this section
public String setCellData(String sheetName, String colName, int rowNum, String data) {
try {
fis = new FileInputStream(path);
workbook = new XSSFWorkbook(fis);
if (rowNum <= 0)
return "";
int index = workbook.getSheetIndex(sheetName);
int colNum = -1;
if (index == -1)
return "";
sheet = workbook.getSheetAt(index);
row = sheet.getRow(0);
for (int i = 0; i < row.getLastCellNum(); i++) {
// System.out.println(row.getCell(i).getStringCellValue().trim());
if (row.getCell(i).getStringCellValue().trim().equals(colName))
colNum = i;
}
if (colNum == -1)
return "";
sheet.autoSizeColumn(colNum);
row = sheet.getRow(rowNum - 1);
if (row == null)
row = sheet.createRow(rowNum - 1);
cell = row.getCell(colNum);
if (cell == null)
cell = row.createCell(colNum);
// cell style
// CellStyle cs = workbook.createCellStyle();
// cs.setWrapText(true);
// cell.setCellStyle(cs);
cell.setCellValue(data);
fileOut = new FileOutputStream(path);
workbook.write(fileOut);
fileOut.close();
} catch (Exception e) {
e.printStackTrace();
return "";
}
return "";
}
so can anybody tell me where I m going wrong.
Have a look at the HOWTO and examples.
You will notice that there are calls for creating a row or creating a cell. Unless you do so, the row/cell does not exist and your getCell() function will return null.
Changing for loop condition part i.e. i < row.getLastCellNum(); to i < row.getLastCellNum()-1; can resolve this issue.
getLastCellNum() returns index plus one and once the counter will reach to end value, getCell(i) can point to the null value as per your code.
I want to compare the data from table 1 with all data from table 2 (Line by line), the problem is, how could i iterate .getRow(1) to compare row by row of table 1?
I mean; we are comparing data from table 1 and row 1 with all lines of table 2. When the process ends I would like to continue with .getRow(2) thanks (Code updated)
DataFormatter formatter = new DataFormatter();
int numRows2 = workbook2.getSheetAt(0).getPhysicalNumberOfRows();
int numRows = workbook.getSheetAt(0).getPhysicalNumberOfRows();
int num = 0;
int num2 = 1;
while(numRows!=0) {
numRows--;
String dato = formatter.formatCellValue(workbook.getSheetAt(0).getRow(num2++).getCell(1));
for (int i = 0; i < numRows2; i++) {
String val = formatter.formatCellValue(workbook2.getSheetAt(0).getRow(num++).getCell(1));
if (dato.contains(val)) {
System.out.println("Works " + val);
}else {
System.out.println("No match");
}
}
}
I'm answering my own question, this code works in case someone needs it.
DataFormatter formatter = new DataFormatter();
int numRows2 = workbook2.getSheetAt(0).getPhysicalNumberOfRows();
int numRows = workbook.getSheetAt(0).getPhysicalNumberOfRows();
// int num = 0;
int num2 = 1;
while (numRows > 0) {
numRows--;
int num = 0;
String dato = formatter.formatCellValue(workbook.getSheetAt(0).getRow(num2++).getCell(1));
for (int i = 0; i < numRows2; i++) {
String val = formatter.formatCellValue(workbook2.getSheetAt(0).getRow(num++).getCell(1));
if (dato.contains(val)) {
System.out.println("Works " + val);
} else {
System.out.println("No match");
}
}
}
I have this spreadsheet
I would like to iterate all the rows containing "USED" keywords and empty strings (spaces) , save all row numbers that match those criteria to an ArrayList , then loop my spreadsheet and remove all the row numbers listed in my ArrayList.
I tried and modified some solutions from Stackoverflow (one of them from here) . My codes look like this
// Remove "USED" and empty string from spreadsheet
private static void cleanUpSheet(String sheetName, String pathToExcel) throws IOException, InvalidFormatException {
FileInputStream fileInput = new FileInputStream(pathToExcel);
Workbook workbook = WorkbookFactory.create(fileInput);
List<Integer> toRemove = new ArrayList<>();
int index = workbook.getSheetIndex(sheetName);
if (index == -1)
System.out.println("No sheet Found");
else {
System.out.println("Index " + index);
Sheet sheet = workbook.getSheetAt(index);
Iterator<Row> rowItr = sheet.iterator();
DataFormatter formatter = new DataFormatter();
System.out.println("Total ROW " + sheet.getLastRowNum());
while (rowItr.hasNext()) {
Row row = rowItr.next();
if (containsValue(row, row.getFirstCellNum(), row.getLastCellNum())) {
//Row contains value
System.out.println("Value Cell 0 " + formatter.formatCellValue(row.getCell(0)));
if (formatter.formatCellValue(row.getCell(0)).equals("USED")) {
System.out.println("Value cell 0 should contain USED " + formatter.formatCellValue(row.getCell(0)));
toRemove.add(row.getRowNum());
System.out.println("What I am removing "+ row.getCell(4).getRichStringCellValue());
}
continue;
} else {
//Row does not contain value
System.out.println("Empty row " + formatter.formatCellValue(row.getCell(0)));
toRemove.add(row.getRowNum());
System.out.println("What I am removing "+ row.getCell(4).getRichStringCellValue());
}
}
for (int i = 0 ; i<toRemove.size() ; i++) {
System.out.println("To Remove " + toRemove.get(i));
removeRow(pathToExcel,toRemove.get(i),false,sheet);
}
System.out.println("New Total Row " + sheet.getLastRowNum());
}
fileInput.close();
FileOutputStream outFile = new FileOutputStream(new File(pathToExcel));
workbook.write(outFile);
outFile.close();
}
private static void removeRow(String pathToExcel, int rowToBeRemoved, boolean removeIndexOneOnly, Sheet sheet) throws IOException, InvalidFormatException {
if (removeIndexOneOnly == true) rowToBeRemoved = 1;
int lastRowNum = sheet.getLastRowNum();
Row row = sheet.getRow(rowToBeRemoved);
if (row != null && rowToBeRemoved != lastRowNum) {
//System.out.println(row.getCell(3).getRichStringCellValue()); //For Testing
//System.out.println(row.getCell(4).getRichStringCellValue()); //For Testing
System.out.println("row to be removed " + rowToBeRemoved);
System.out.println("last row " + lastRowNum);
sheet.removeRow(row);
sheet.shiftRows(rowToBeRemoved + 1, lastRowNum, -1);
}
if (rowToBeRemoved == lastRowNum) {
System.out.println("Very Last Row");
Row removingRow = sheet.getRow(rowToBeRemoved);
if (removingRow != null) {
sheet.removeRow(removingRow);
}
}
}
The result looks like this
When I run in debug mode , I can see that my List<Integer> toRemove does list the correct row numbers I want to remove (i.e. containing "USED" and empty spaces). So far so good.
But when I execute this part of codes
for (int i = 0 ; i<toRemove.size() ; i++) {
System.out.println("To Remove " + toRemove.get(i));
removeRow(pathToExcel,toRemove.get(i),false,sheet);
}
It just doesn't remove all rows listed in List<Integer> toRemove.
I am using POI 3.17.
I am wondering where could I do wrongly.
Thanks.
I'm here to ask for help in my java project in Netbeans.
I'm using Apache POI to import/export excel data. To make you understand what is the problem in my application, I'm showing you a print of the debug.
In the print, you can see 2 sheets. The first header "aiai" and the data from that sheet.
My problem is: How do i insert the data from "aiai2" which is the second sheet from my excel file, in its proper place, below the header "aiai2"
On other words, I want to separate the sheets vertically.
Below, I will show my code:
Workbook wb;
public String Importar(File archivo, JTable tablaD) {
String answer = "Unable to import";
DefaultTableModel modeloT = new DefaultTableModel();
tablaD.setModel(modeloT);
tablaD.getModel();
tablaD.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
try {
wb = WorkbookFactory.create(new FileInputStream(archivo));
int nsheets = wb.getNumberOfSheets();
for (int i = 0; i < nsheets; i++) {
Sheet sheet = wb.getSheetAt(i);
Iterator filaIterator = sheet.rowIterator();
int rownum = -1;
while (filaIterator.hasNext()) {
rownum++;
Row fila = (Row) filaIterator.next();
/*if (i > 0) {//se o nr da ficha atual for maior que 0, começa a escrever as linhas apartir da row 0 da tabela
modeloT.moveRow(modeloT.getRowCount() -1, modeloT.getRowCount() - 1, 0);
}*/
Iterator columnaIterator = fila.cellIterator();
Object[] listaColumna = new Object[1000];
int columnnum = -1;
while (columnaIterator.hasNext()) {
columnnum++;
Cell celda = (Cell) columnaIterator.next();
if (rownum == 0) {
modeloT.addColumn(celda.getStringCellValue());
} else {
if (celda != null) {
switch (celda.getCellType()) {
case Cell.CELL_TYPE_NUMERIC:
listaColumna[columnnum] = (int) Math.round(celda.getNumericCellValue());
break;
case Cell.CELL_TYPE_STRING:
listaColumna[columnnum] = celda.getStringCellValue();
break;
case Cell.CELL_TYPE_BOOLEAN:
listaColumna[columnnum] = celda.getBooleanCellValue();
break;
default:
listaColumna[columnnum] = celda.getDateCellValue();
break;
}//end switch case
System.out.println("Column:" + columnnum + " Row:" + rownum + " value:" + celda + ".");
}
}
}//end while column Iterator
if (rownum != 0) {
modeloT.addRow(listaColumna);
}
}//end while row iterator
}//end for
answer = "Imported with success";
} catch (IOException | InvalidFormatException | EncryptedDocumentException e) {
System.err.println(e.getMessage());
}
return answer;
}
public String Exportar(File archivo, JTable tablaD) {
String answer = "Unable to export";
int numFila = tablaD.getRowCount(), numColumna = tablaD.getColumnCount();
if (archivo.getName().endsWith("xls")) {
wb = new HSSFWorkbook();
} else {
wb = new XSSFWorkbook();
}
Sheet hoja = wb.createSheet("Default");
try {
for (int i = -1; i < numFila; i++) {
Row fila = hoja.createRow(i + 1);
for (int j = 0; j < numColumna; j++) {
Cell celda = fila.createCell(j);
if (i == -1) {
celda.setCellValue(String.valueOf(tablaD.getColumnName(j)));
} else {
celda.setCellValue(String.valueOf(tablaD.getValueAt(i, j)));
}
wb.write(new FileOutputStream(archivo));
}
}
answer = "Exported with success";
} catch (Exception e) {
System.err.println(e.getMessage());
}
return answer;
}
As I understand your question, I assume you want to create a separate table for each sheet, one below other. In that case you need to create a new table everytime you read a new sheet. If you use only one table, you will get only one header.
Try this :
Create a new method Importar that takes a new table and a Sheet parameter
public String Importar(JTable tablaD, Sheet sheet) {
String answer = "Unable to import";
DefaultTableModel modeloT = new DefaultTableModel();
tablaD.setModel(modeloT);
tablaD.getModel();
tablaD.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
try {
Iterator filaIterator = sheet.rowIterator();
int rownum = -1;
....
....
So the calling method would be :
try {
Workbook wb = WorkbookFactory.create(new FileInputStream(archivo));
int nsheets = wb.getNumberOfSheets();
for (int i = 0; i < nsheets; i++) {
//You have to make sure your JTable gets rendered.
JTable tablaD = new JTable();
Importar( tablaD, wb.getSheetAt(i) );
}
} catch ( Exception e ) {
e.printStackTrace();
}
Important point is that your new table needs to get rendered or added to frame each time before you call Importar
I have the below java program which is trying too read the excel sheet through java poi , first see below the excel sheet format it would be like as shown below
abcRef 21
ABC 20
ERT 60
FGT 57
abcRef SMS Seal Total
12 45 DRT 3000
23 36 QWE 2000
subtotal 5000
abcRef SMS Seal Total
18 25 hRT 1000
29 16 tWE 2100
subtotal 3100
RTY 57
TDZ 21
YUI 98
so as you can see above i need to catch all the table ranges staring from abcRef and ending at Total column so for that I have added the condition of header cell that first to catch this combination in other words first to find the header cell
abcRef+SMS+Seal+Total
which i am able to achieve so my below program first iterate through all the rows then try to find the header cell of the combination and then print all the values which it is doing
but there are few challenges in which i will be requiring your advise
i want only tables to be printed on console so for that i want to break my program whenever
1)any empty row is encountered
2)any row having the value of cell as
subtotal
3) any header cell is encounterd which is a combination of
(abcRef+SMS+Seal+Total)
so please advise how can i customize my below code to achieve so that i can print the below thing on my console
abcRef SMS Seal Total
12 45 DRT 3000
23 36 QWE 2000
abcRef SMS Seal Total
18 25 hRT 1000
29 16 tWE 2100
below is my piece of code in below program rite now in which only the header row is printed not as above shown which i want
public class abc{
public static void main(String[] args) throws Exception {
FileInputStream file = null ;
try {
HSSFRow r =findgetRowNo();
getAllColumnFromRow(r);
}
catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally{
file.close();
}
}
public static void getAllColumnFromRow(HSSFRow RowObject){
Iterator<Cell> itr = RowObject.iterator();
HSSFRow headerRow = RowObject.getSheet().getRow(0);
String cellValue = "";
String information = "";
int headerCellCount = 0;
//to avoid first column
while(itr.hasNext()){
Cell cell = itr.next();
Cell headerValue = headerRow.getCell(headerCellCount++);
switch(cell.getCellType()) {
case HSSFCell.CELL_TYPE_BOOLEAN:
cellValue = cell.getBooleanCellValue() +"";
information = information + " " +headerValue+" - "+cellValue+ "; ";
break;
case HSSFCell.CELL_TYPE_NUMERIC:
cellValue = cell.getNumericCellValue() + "";
information = information + " " +headerValue+" - "+cellValue+ "; ";
break;
case HSSFCell.CELL_TYPE_STRING:
cellValue = cell.getStringCellValue();
System.out.println(cellValue);
information = information + " " +headerValue+" - "+cellValue+ "; ";
break;
case HSSFCell.CELL_TYPE_BLANK:
break;
}
}
System.out.println("####");
}
public static int findHeaderCell(HSSFSheet firstSheet) {
final String[] headers1 = { "abcRef", "SMS", "Seal", "Total "};
List<String> listHeader=Arrays.asList(headers1);
for (Row row : firstSheet) {
for (Cell cell : row) {
if(listHeader.contains(cell.getStringCellValue())) {
int row1 = cell.getRowIndex() + 1;
int col = cell.getColumnIndex();
if (firstSheet.getRow(row1) == null)
throw new RuntimeException("Row " + row1 + 1 + " is empty!");
Cell startOfFirstDataRow = firstSheet.getRow(row1).getCell(col);
if (startOfFirstDataRow == null) {
CellReference ref = new CellReference(row1, col);
throw new RuntimeException("Data not found at " + ref.formatAsString());
}
// now we take row from above to be the Row object where we seek our headers
int last = row.getLastCellNum();
for (int c = row.getFirstCellNum(); c < last; c++) {
int h = 0;
// check if the cell at (c + h) has the required value
for (; h < listHeader.size() && c + h < last; h++) {
if (!listHeader.get(h).equals(row.getCell(c + h).getStringCellValue())) {
System.out.println("headers not match as Expected");
break; // if the cell value differs from our header
}
}
int t;
if (h == listHeader.size()) // this means the break was never invoked
System.out.println("headers Matched as Expected");
return row.getRowNum();
// return c; // found it
}
// not found
return -1;
}
}
}
throw new RuntimeException("TradingRef header cell not found!");
}
public static HSSFRow findgetRowNo() throws Exception {
FileInputStream file = null ;
file = new FileInputStream(new File("C:\\abc.xls"));
HSSFWorkbook workbook = new HSSFWorkbook(file);
HSSFSheet firstSheet1 = workbook.getSheetAt(0);
Iterator<Row> rowItr = firstSheet1.iterator();
final String[] headers1 = { "abcRef", "SMS", "Seal", "Total "}
List<String> listHeader=Arrays.asList(headers1);
for (Row row : firstSheet1) {
for (Cell cell : row) {
if(listHeader.contains(cell.getStringCellValue())) {
int row1 = cell.getRowIndex() + 1;
int col = cell.getColumnIndex();
if (firstSheet1.getRow(row1) == null)
throw new RuntimeException("Row " + row1 + 1 + " is empty!");
Cell startOfFirstDataRow = firstSheet1.getRow(row1).getCell(col);
if (startOfFirstDataRow == null) {
CellReference ref = new CellReference(row1, col);
throw new RuntimeException("Data not found at " + ref.formatAsString());
}
// now we take row from above to be the Row object where we seek our headers
int last = row.getLastCellNum();
for (int c = row.getFirstCellNum(); c < last; c++) {
int h = 0;
// check if the cell at (c + h) has the required value
for (; h < listHeader.size() && c + h < last; h++) {
if (!listHeader.get(h).equals(row.getCell(c + h).getStringCellValue())) {
System.out.println("headers not match as Expected");
break; // if the cell value differs from our header
}
}
int t;
if (h == listHeader.size()) // this means the break was never invoked
System.out.println("headers Matched as Expected");
row.getPhysicalNumberOfCells();
return (HSSFRow) row;
// return c; // found it
}
// not found
return null;
}
}
}
throw new RuntimeException("abcRef header cell not found!");
}
}
Can some body please advise on this