package youg; import java.io.FileInputStream; import java.io.InputStream; import java.util.Vector; import jxl.Cell; import jxl.Sheet; import jxl.Workbook; public class ReadExcel { //Vector v_identNumber = new Vector(); // ��Ŷ�ȡ�����ĺ��� public Vector<String> readExcel(String filePath) throws Exception { Vector<String> v = new Vector<String>(); // ��Ŷ�ȡ����������͵绰 InputStream iStream = null; Workbook workbook = null; iStream = new FileInputStream(filePath); workbook = Workbook.getWorkbook(iStream); // sheet row column �±궼�Ǵ�0��ʼ�� Sheet sheet = workbook.getSheet(0); int column = sheet.getColumns(); int rows = sheet.getRows(); System.out.println("����" + rows + "�У�" + column + "�����"); for (int i = 1; i < rows; i++) { Cell[] cells = sheet.getRow(i); //System.out.println(cells[0].getContents()); v.add(cells[0].getContents()); v.add(cells[1].getContents()); //System.out.println(cells[1].getContents()); //v_identNumber.add(cells[1].getContents()); //System.out.println(cells[2].getContents()); //System.out.println(cells[3].getContents()); } // �������ʱ���رն����ͷ�ռ�õ��ڴ�ռ� if (iStream != null) iStream.close(); if (workbook != null) workbook.close(); return v; } /** * @param args * @throws Exception */ // public static void main(String[] args) throws Exception { // String filePath = "D:\\testreadexcel.xls"; // ReadExcel readExcel = new ReadExcel(); // readExcel.readExcel(filePath).toString(); // // } }

hfffff LV1
2024年6月3日
jiangqiang LV12
2024年1月16日
大神程序员 LV23
2024年1月12日
fdo666 LV6
2024年1月10日
sdfsdfsfsd LV1
2024年1月9日
fesfefe LV13
2023年11月17日
VignyBear LV2
2023年5月30日
ccc9527 LV1
2022年10月6日
姜广坤 LV14
2022年5月20日
wyx065747 LV67
2022年3月13日

DoustrongWU LV5
2月16日
admin202498
2024年12月26日
暂无贡献等级
13133117021 LV5
2024年12月24日
菩提树下的椰子 LV17
2024年12月18日
hoictas LV2
2024年11月26日
15719908287 LV10
2024年11月16日
qq216152 LV9
2024年9月26日
2606940687 LV1
2024年6月30日
qqqww11 LV2
2024年6月26日
王东东 LV17
2024年6月4日