惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
V
V2EX
博客园_首页
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
H
Help Net Security
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
云风的 BLOG
云风的 BLOG
D
Docker
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
N
News and Events Feed by Topic
Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
A
Arctic Wolf
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
aimingoo的专栏
aimingoo的专栏
Hacker News: Ask HN
Hacker News: Ask HN
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy International News Feed
T
Troy Hunt's Blog
T
Tenable Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Recorded Future
Recorded Future
F
Fortinet All Blogs
D
DataBreaches.Net
B
Blog
T
Threat Research - Cisco Blogs
MyScale Blog
MyScale Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
The GitHub Blog
The GitHub Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence

博客园 - 山里人家

PHP魔术函数集锦 gbk gb2312 utf8区别 适合初学者,用MyEclipse编写第一个j2me MyEclipse开发手机程序-安装开发环境(图解) - 山里人家 - 博客园 javascript 常用语法词典 - 山里人家 - 博客园 电脑高手最常用的5个按钮! 汇总Eclipse快捷键 myeclipse7汉化 S2SH配置 - 山里人家 - 博客园 struts2通过拦截器实现用户权限验证 struts2 ognl 与 jsp2.1 el 的冲突问题 STRUTS2 ACTION的跳转类型说明 STRUTS 2之 标签 myeclipse 快捷键 STRUTS2 ACTION的扩展名修改方法 ASP.NET网络编程中经常用到的27个函数集 Asp.Net细节性问题技巧精萃 DIV确认对话框 JXL包使用
JXL读取EXCEL
山里人家 · 2008-08-05 · via 博客园 - 山里人家

import java.io.File;
import jxl.*;

public class Test2 {

    
public static void main(String[] args) {
        
try {
            Workbook book 
= Workbook.getWorkbook(new File("测试.xls"));
            
// 获得第一个工作表对象
            Sheet sheet = book.getSheet(0);
            
// 得到单元格
            for (int i = 0; i < sheet.getColumns(); i++{
                
for (int j = 0; j < sheet.getRows(); j++{
                    Cell cell 
= sheet.getCell(i, j);
                    System.out.print(cell.getContents() 
+ "  ");
                }

                System.out.println();
            }

            book.close();
        }
 catch (Exception e) {
            System.out.println(e);
        }

    }

}

posted @ 2008-08-05 10:14  山里人家  阅读(8345)  评论(0)    收藏  举报

刷新页面返回顶部