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

推荐订阅源

AI
AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
Last Week in AI
Last Week in AI
Apple Machine Learning Research
Apple Machine Learning Research
WordPress大学
WordPress大学
F
Full Disclosure
博客园 - 【当耐特】
博客园 - 司徒正美
V
Visual Studio Blog
F
Fortinet All Blogs
T
Tor Project blog
T
Threatpost
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
C
Cyber Attacks, Cyber Crime and Cyber Security
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
M
MIT News - Artificial intelligence
L
Lohrmann on Cybersecurity
P
Palo Alto Networks Blog
I
Intezer
Stack Overflow Blog
Stack Overflow Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
S
Securelist
T
Tailwind CSS Blog
V
Vulnerabilities – Threatpost
U
Unit 42
博客园 - 叶小钗
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
Hacker News - Newest:
Hacker News - Newest: "LLM"
NISL@THU
NISL@THU
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
SecWiki News
SecWiki News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
TaoSecurity Blog
TaoSecurity Blog
A
Arctic Wolf
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
N
News | PayPal Newsroom

博客园 - 山里人家

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)    收藏  举报

刷新页面返回顶部