我正在尝试通过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()