Can I create an Excel file with Tcl/Tk?

Thirukumaran
Thirukumaran Altair Community Member
edited October 18 in Community Q&A

Hi,

I would like to create an Excel file with specific worksheet and add various kinds of data to the excel sheet. Is it possible to create such file for report. If yes, what specific packages can be used from HM to create *.xlsx filetype and kindly provide the sources for the packages to refer accordingly.

Thanks in advance,

Thirukumaran Subbian 

Answers

  • Vladimir_Gantovnik
    Vladimir_Gantovnik Altair Community Member
    edited October 18

    You can create an Excel file and add data using the Tcl by utilizing the tcom package, which allows interaction with COM objects such as Excel. Or... just print your data in a CSV file, and process it in VBA, python, or even tcl :)

    set file [open "output.csv" w]