Ironpython Spotfire /导出到html文件

问题描述 投票:0回答:1

我已经看到了通过ironpython导出为ex​​cel或pdf的方法,但我真正需要的是使用ironpython脚本创建一个html文件。

现在,我正在使用这一行代码,但是我可以创建文档。

with open("C:\\Users\\output\\testfile.html","w") as file:
    file.write(htmlReport)
python ironpython spotfire spotfire-analyst
1个回答
0
投票

我尝试过此代码,它似乎可以工作并创建html文件-

htmlReport="""<html>
<body><table border=1>
<tr><td>1</td><td>AAA</td></tr><tr><td>2</td><td>BBB</td></tr><tr><td>3</td><td>CCC</td></tr></table></body></html>"""


with open("C:\\temp\\testfile.html","w") as file:
    file.write(htmlReport)
© www.soinside.com 2019 - 2024. All rights reserved.