spotfire - 导出所有计算列的计算
问题描述
我继承了几个带有几个计算列的报告。为了理解和记录,我需要导出这些列后面的所有计算。
在网上搜索我找不到任何有用的东西。
到目前为止,该过程是打开每列的属性并手动复制公式。
有什么更有效的吗?
解决方案
您可以使用 IronPython 脚本来获取计算列的每个表名、列名和表达式。
myDict = {}
#Loop Through All Data Tables
for x in Document.Data.Tables:
#Loop Through all Columns in Table
for z in x.Columns:
#If Column has an Expression /Is Caculated Column
if z.Properties.Expression:
#Append Items to Dictonary to print at end
MyItems = {'Table Name' : x.Name , 'Expression' :z.Properties.Expression }
myDict[z.Name] = MyItems
#Print Each Table Name, Column Name and Expression
print(x.Name , z.Name , z.Properties.Expression)
#Print Full List
print myDict
推荐阅读
- java - Spring Cloud Gateway:发布大文件时出现“连接已在响应之前关闭,同时发送请求正文”错误
- javascript - 使用 .reduce() 使用先前数组中的所有相似键值创建一个新数组
- rust - 如何通过对象安全方法中的动态调度传递闭包?
- ibm-cloud - 无法查看 API Connect Cloud Foundry 页面
- python - python中map和filter的区别
- mysql - 在另一个选择中选择案例
- android - Unity中Android的纵横比
- reactjs - 如何使用 useReducer 钩子测试组件?
- php - 为 Paypal 付款添加折扣
- javascript - 如何验证浏览器是否支持后台同步?