Arquivo xls

1 resposta
progJava

Estou utilizando o code para criar um arquivo xls mas estou com erro,tirei o pedaço do code que esta com erro e executei mesmo assim ele ñ cria, o que pode ser? vlw

package testes;

/**
 *
 * @author G
 */
import java.io.File; 
import java.io.IOException;
import java.sql.SQLException;
import java.util.Date; 
import jxl.*; 
import jxl.read.biff.BiffException;
import java.io.File; 
import java.util.Date; 
import jxl.*; 
import jxl.write.*; 




public class v {
  public static  Workbook workbook;
    public  static void v() throws IOException, BiffException{
    /** Creates a new instance of v */
  try {
Workbook workbook = Workbook.getWorkbook(new File("myfile.xls"));
  }
  catch (IOException e){
      
  }
          

  Sheet sheet = workbook.getSheet(0);
Cell a1 = sheet.getCell(0,0); 
Cell b2 = sheet.getCell(1,1); 
Cell c2 = sheet.getCell(2,1); 

String stringa1 = a1.getContents(); 
String stringb2 = b2.getContents(); 
String stringc2 = c2.getContents(); 

    }/*
public static  v(){
    Label label = new Label(0, 2, "A label record"); 
sheet.addCell(label); 

Number number = new Number(3, 4, 3.1459); 
sheet.addCell(number); 

}*/
    public static void main (String args[]){
        new v();
    }
}

[code]

1 Resposta

V

Fala ae brother… vê se isso lhe ajuda…

http://www.guj.com.br/java/235684-gerando-relatorio-em-excel-sem-uso-de-api#1226589

Qualquer coisa… to ae

Criado 25 de junho de 2011
Ultima resposta 25 de jun. de 2011
Respostas 1
Participantes 2