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

查看:28
本文介绍了如何“格式化为表格"在 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 中做同样的事情吗?或者,是否可以通过宏/公式直接在 Excel 中完成上述操作(而不是 CTRL+T 或单击工具栏按钮)?

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 中有一个相当新的功能,可以满足您的需求.获取最近的 nightly/svn 构建(或等待一周左右的 POI 3.8 beta 3),并查看 XSSFTable.您现在应该能够在工作表中添加一个,指定它适用的范围(您希望成为表格的范围),希望这对您有用.虽然它很新,所以你可能需要加入 POI dev list 并帮助开发如果它不适合您,请使用该功能!

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天全站免登陆