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

public class data2
{
     public static String toString(String s1[], String s2[],double x[],double y[]) 
     {   
	 String s="";
     for(int i=0;i<x.length;i++)
     {s+=s1[i]+" "+s2[i]+" x["+i+"] = "+x[i]+" y["+i+"] = "+y[i]+"\n ";}

     return s;
     }
	 	
public static void main(String args[]) throws IOException
{
String s1[]=new String[4];
String s2[]=new String[4];	
double x[]=new double[4];
double y[]=new double[4];
	
try
{
Workbook workbook = Workbook.getWorkbook(new File("data2.xls"));
Sheet sheet = workbook.getSheet(1); 

Cell cs1;
Cell cs2;
Cell cx;
Cell cy;
for(int i=0;i<4;i++)
{
cs1=sheet.getCell(1,i+1);	
cs2=sheet.getCell(2,i+1);
cx=sheet.getCell(3,i+1);
cy=sheet.getCell(4,i+1);
LabelCell lc1 = (LabelCell) cs1;
LabelCell lc2 = (LabelCell) cs2; 
s1[i] = lc1.getString(); 
s2[i] = lc2.getString(); 
NumberCell ncx = (NumberCell) cx; 
NumberCell ncy = (NumberCell) cy; 
x[i]=ncx.getValue();
y[i]=ncy.getValue();
}
} 
  catch(jxl.read.biff.BiffException e1) {};
System.out.println(toString(s1,s2,x,y));
}

}