para yamil otravez
Publicado por juan (1 intervención) el 05/10/2005 16:52:18
hola he probado todo lo que me has dicho javac -classpath ...etc fra.java
import java.io.File;
import java.io.*;
import java.util.Date;
import jxl.*;
class fra{
public static void main(String[] args){
Workbook libro = Workbook.getWorkbook(new File("myfiles.XLS"));
Sheet sheet =libro.getSheet(0);
Cell a1 = sheet.getCell(0,0);
Cell b2 = sheet.getCell(1,1);
Cell c2 = sheet.getCell(2,1);
String aa1 = a1.getContents();
String bb2 = b2.getContents();
String cc2 = c2.getContents();
System.out.print(aa1 + " " + bb2 + " " + cc2);
//sheet.close();
libro.close();
}
}
y el error que me da en la linea
Workbook libro = Workbook.getWorkbook(new File("myfiles.XLS"));
el error es UNREPORTED EXCEPTION java.io.IOException; must be caught or declarated to be thorown.
Y hay me he quedado.
import java.io.File;
import java.io.*;
import java.util.Date;
import jxl.*;
class fra{
public static void main(String[] args){
Workbook libro = Workbook.getWorkbook(new File("myfiles.XLS"));
Sheet sheet =libro.getSheet(0);
Cell a1 = sheet.getCell(0,0);
Cell b2 = sheet.getCell(1,1);
Cell c2 = sheet.getCell(2,1);
String aa1 = a1.getContents();
String bb2 = b2.getContents();
String cc2 = c2.getContents();
System.out.print(aa1 + " " + bb2 + " " + cc2);
//sheet.close();
libro.close();
}
}
y el error que me da en la linea
Workbook libro = Workbook.getWorkbook(new File("myfiles.XLS"));
el error es UNREPORTED EXCEPTION java.io.IOException; must be caught or declarated to be thorown.
Y hay me he quedado.
Valora esta pregunta


0