336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
안드로이드에서 엑셀 파일 사용하기
import java.io.File;
import java.util.Date;
import jxl.*;
...
Workbook workbook = Workbook.getWorkbook(new File("myfile.xls"));
(NOTE: when creating a spreadsheet from a ServletInputStream you must remove the HTTP header information before creating the Workbook object.)
Once you have accessed the workbook, you can use this to access the individual sheets. These are zero indexed - the first sheet being 0, the second sheet being 1, and so on. (You can also use the API to retrieve a sheet by name).
Sheet sheet = workbook.getSheet(0);
Once you have a sheet, you can then start accessing the cells. You can retrieve the cell's contents as a string by using the convenience method getContents(). In the example code below, A1 is a text cell, B2 is numerical value and C2 is a date. The contents of these cells may be accessed as follows
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();
// Do stuff with the strings etc
엑셀을 활용하기 위한 라이브러리 다운은 여기로
더 자세한 설명은 여기로
'프로그래밍 > 안드로이드' 카테고리의 다른 글
android.os.NetworkOnMainThreadException (0) | 2013.10.03 |
---|---|
lazy load of images in ListView (0) | 2013.10.03 |
java에서 post 나 get을 이용해서 웹에있는 파일이나 html 파일을 받아올때 사용하는 함수입니다. (0) | 2013.10.02 |
TimePickerDialog가 두번 발생하는 현상 (0) | 2013.10.01 |
자바 초성 분리 소스 (0) | 2013.08.20 |