重点在Excel中第一个单元格 [英] Focus on first cell in excel

查看:294
本文介绍了重点在Excel中第一个单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(file)); 
HSSFSheet s = wb.getSheetAt(0); 
wb.setActiveSheet(0);
s.showInPane(0, 0);
FileOutputStream out = new FileOutputStream(file);
wb.write(out);
out.close(); 

我使用上述code采取重点第一个单元格(当我打开Excel第一个单元格shouldd被选中)。它被正确打开的Excel,因为 showInPane ,但在选择第一个单元格是行不通的。

I am using above code for taking focus to first cell (when I open excel first cell shouldd be selected). It is opening the excel correctly because of showInPane, but selecting the first cell is not working.

推荐答案

<一个href=\"http://stackoverflow.com/questions/5459852/apache-poi-set-selected-cell-after-xls-document-opens\">Similar问题与原来的海报张贴有关他在POI邮件列表归档找到了解决办法。

Similar question with the original poster posting about the solution he found in the POI mailing list archive.

这篇关于重点在Excel中第一个单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆