Spotfire-IronPython:创建一个空的数据表并添加行

时间:2018-10-25 08:13:10

标签: ironpython spotfire tibco

我的目标是根据可视化信息写出自定义的csv文件。

阅读每一页后,我获取过滤的行。经过一些计算后,我想将列或行写出到csv文件中。您能否提供有关如何实现此目标的示例片段? 到目前为止,这是我的尝试:

for pg in Document.Pages
    table = pg.ActiveDataTableReference
    filteredRows = pg.ActiveFilteringSelectionReference.GetSelection(table).AsIndexSet()

    # here to do some calculations, calculatedColumns/rows
    # Here to write calculatedColumns/rows into a new data table
    writer = Document.Data.CreateDataWriter(DataWriterTypeIdentifiers.ExcelXlsDataWriter) # to look if there is CSV TypeIdentifier

    stream = File.OpenWrite("E:\\Spotfire_Export\\Page_"+str(count) +"_"+ pg.Title +".csv")

    # Use writer class to write calculated columns to new table
    stream.Close()
    stream.Dispose()

0 个答案:

没有答案