在Crossfire中将交叉表可视化导出到Excel

时间:2018-04-30 09:57:20

标签: ironpython spotfire

我正在尝试通过Iron Python脚本将Cross Table可视化导出到Excel。以下代码适用于数据表导出。你能指导我从交叉表中导出它吗?

from Spotfire.Dxp.Data.Export import DataWriterTypeIdentifiers 
from System.IO import File
writer = 
Document.Data.CreateDataWriter(DataWriterTypeIdentifiers.ExcelXlsDataWriter)
filtering = 
Document.ActiveFilteringSelectionReference.GetSelection(table).AsIndexSet()
stream = File.OpenWrite("C:\Users\Q849965\Desktop\SpotfireExport.xls")
names = []
for col in table.Columns:
names.append(col.Name)
writer.Write(stream, table, filtering, names)
stream.Close()

0 个答案:

没有答案