简体   繁体   中英

Ironpython Spotfire / Export to html file

I've seen ways to export to excel or to a pdf through ironpython but what I really need is to create a html file with a ironpython script.

Right now I'm using this line of code but I'm able to create the document.

with open("C:\\Users\\output\\testfile.html","w") as file:
    file.write(htmlReport)

I tried this code and it seems to work and create the html file-

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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