import java.io.*;
import javax.swing.*;
import jxl.*; 
import jxl.write.*;
import jxl.format.*;
 
//import java.util.Locale;

public class data1
{
     public static String toString(double x[],double y[]) 
     {   
	 String s="";
     for(int i=0;i<x.length;i++)
     {s+="x["+i+"]=  "+x[i]+"  y["+i+"] = "+y[i]+"\n ";}
     return s;
     }
	 	
public static void main(String args[]) throws IOException
{
double x[]=new double[20];
double y[]=new double[20];
	
try
{
Workbook workbook = Workbook.getWorkbook(new File("data1.xls"));
Sheet sheet = workbook.getSheet(0); 

Cell cx;
Cell cy;
for(int i=0;i<x.length;i++)
{
cx=sheet.getCell(1,i+1);
cy=sheet.getCell(2,i+1);
NumberCell ncx = (NumberCell) cx; 
NumberCell ncy = (NumberCell) cy; 
x[i]=ncx.getValue();
y[i]=ncy.getValue();
}
} 
  catch(jxl.read.biff.BiffException e1) {};
JOptionPane.showMessageDialog(null,toString(x,y));
}

}