简体   繁体   English

如何在 Spotfire 中将交叉表(!没有值格式!)导出到 Excel(IronPython 脚本)

[英]How to Export Cross Table ( ! without value formatting ! ) to Excel in SPotfire ( IronPython Script )

Good morning,早上好,

I can extract a report in CSV format and put it in my directory with the following code underneath.我可以提取 CSV 格式的报告,并将其放在我的目录中,下面的代码如下。 The only problem is that I want to extract it without value formatting.唯一的问题是我想在没有值格式的情况下提取它。

enter from System.IO import Path, File, StreamWriter
      from Spotfire.Dxp.Application.Visuals import TablePlot
      from System.IO import Path, File, StreamWriter
      from Spotfire.Dxp.Application.Visuals import TablePlot
      from Spotfire.Dxp.Data import DataPropertyClass
      from Spotfire.Dxp.Data import DataType
      from Spotfire.Dxp.Data.Export import DataWriterTypeIdentifiers
      from Spotfire.Dxp.Data import DataPropertyClass
      from Spotfire.Dxp.Data import DataType
      from System.IO import File, Directory
      from System.IO import Path, File, StreamWriter
      from Spotfire.Dxp.Application.Visuals import CrossTablePlot

      report1 = "C:\\export\\report1.csv"
      writer = StreamWriter(report1)

      Viz1.As[CrossTablePlot]().ExportText(writer)

I would like with the option to extract without value formatting.我想选择在没有值格式的情况下提取。

Thank you in advance for your help预先感谢您的帮助

Since your exporting as CSV and not xlsx or other Excel data type I would a script to export to csv and not use the built in function ExportText() as the final export. Since your exporting as CSV and not xlsx or other Excel data type I would a script to export to csv and not use the built in function ExportText() as the final export.

https://community.tibco.com/wiki/how-export-tablecross-table-visualization-data-csv-file-using-tibco-spotfirer-using-ironpython has a good example where all the data is being writen to the csv file as strings. https://community.tibco.com/wiki/how-export-tablecross-table-visualization-data-csv-file-using-tibco-spotfirer-using-ironpython有一个很好的例子,其中所有数据都被写入csv 文件作为字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM