Vb.net和Excel数据透视表 [英] Vb.net and Excel pivot tables

查看:244
本文介绍了Vb.net和Excel数据透视表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有代码打开Excel电子表格,刷新数据源并刷新所有数据透视表。所有工作都可以保存电子表格并通过电子邮件发送给收件人。当您打开工作簿时,一切看起来都很好。但是,当您尝试使用其中一个切片器时,会发生一个错误,即基础数据未与枢轴一起保存。即使模板的枢轴选项设置为保存数据。查看保存的工作簿,此选项现在未选中。



问题是:如何编写代码以确保在工作簿之前设置保存数据选项保存。



花了几个小时上线试图找到可能的答案,但没有什么可以接近。

I have code to open an excel spreadsheet, refresh the data sources and refresh all of the pivot tables. All works fine where the spreadsheet is saved and emailed to recipients. When you open up the workbook, everything looks good. However, when you try to use one of the slicers, an error occurs that the underlying data was not saved with the pivots. Even though the template has the pivot options set to save data. Looking at the saved workbook, this option is now unchecked.

Question is: How to I write code to ensure that the save data option is set prior to the workbook being saved.

Have spent several hours on-line trying to find a possible answer, but nothing comes close.

推荐答案

感谢您的回复。我找到了解决这个问题的方法。只需使用save data = true。



再次感谢。
Thank you for your responses. I found a solution to the issue. Just use save data = true.

Thanks again.


这篇关于Vb.net和Excel数据透视表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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