使用 Apache POI 刷新数据透视表 [英] Refresh Pivot Table with Apache POI

查看:49
本文介绍了使用 Apache POI 刷新数据透视表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个 Java 应用程序,该应用程序使用包含数据透视表的模板 excel 文件.

I'm currently working on a Java application that uses a template excel file that contains a pivot table.

模板文件还有一个数据表,它为数据透视表提供种子.该数据表通过Apache POI api 动态加载到java 应用程序中.

The template file also has a data sheet that seeds the pivot table. This data sheet is dynamically loaded in the java application through the Apache POI api.

当我打开 excel 文件时,我必须手动刷新数据透视表才能正确加载数据.

When I open the excel file I must refresh the Pivot table manually to get the data loaded correctly.

有什么办法可以使用 POI api 刷新数据透视表,这样我就不必手动执行了吗?

Is there any way to refresh the Pivot table with the POI api so I don't have to manually do it?

推荐答案

您可以简单地激活一个选项,该选项将在每次打开文件时刷新数据透视表.

You can simple activate an option that will refresh the pivot table every time the file is opened.

这个微软文档 说:

在数据透视表选项"对话框的数据"选项卡上,选中打开文件时刷新数据"复选框.

In the PivotTable Options dialog box, on the Data tab, select the Refresh data when opening the file check box.

这篇关于使用 Apache POI 刷新数据透视表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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