如何“格式化为表格”在Excel或apache POI? [英] How to "format as table" in Excel or apache POI?

查看:184
本文介绍了如何“格式化为表格”在Excel或apache POI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Excel 2010中,可以格式化为一组单元格,使得轻松排序和过滤(主页>格式化表)。

In Excel 2010 it's possible to "format as table" a group of cells - enabling easy sorting and filtering (Home > Format As Table).

我可以做吗在Apache POI中也是一样吗?或者,可以通过宏/公式(而不是 CTRL + T 或点击工具栏按钮直接在Excel中完成上述)?

Can I do the same in Apache POI? Alternatively, can one accomplish the above directly in Excel via a macro/formula (as opposed to CTRL+T or clicking on a toolbar button)?

推荐答案

POI中有一个相当新的功能,可以提供您所需要的。抓住最近的夜间/ svn构建(或者在一周左右等待POI 3.8 beta 3),并查看XSSFTable。您现在应该可以将一个添加到工作表中,指定其应用的范围(您想要制作表的范围),并希望能做到这一点。这是非常新的,所以您可能需要加入 POI开发人员列表,并协助开发该功能,如果它不是在那里为你!

There's a fairly new feature in POI that may deliver what you need. Grab a recent nightly/svn build (or wait for POI 3.8 beta 3 in a week or so), and take a look at XSSFTable. You should now be able to add one to a sheet, specify the range it applies to (the range you want to be made a table), and that hopefully will do you. It's quite new though, so you may need to join the POI dev list and help with the development of the feature if it's not quite there for you!

这篇关于如何“格式化为表格”在Excel或apache POI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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