Can We Save Excel File as PDF using TCL?

sanket_patil
sanket_patil Altair Community Member
edited August 2021 in Community Q&A

Hello All,

Can we save excel file as pdf using tcl commands? 

Regards,

Sanket

Answers

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited August 2021

    Not sure what you are trying to do, but using TCL you could call the 'exec' command to launch external applications.

    In order to do something like this (save excel to PDF) you would probably call Excel in batch and somehow call a command there to export the PDF.

    I mean, this is something ore related to Excel than HW commands, as HW Tcl doesn't have any direct access to excel.

  • sanket_patil
    sanket_patil Altair Community Member
    edited August 2021

    Not sure what you are trying to do, but using TCL you could call the 'exec' command to launch external applications.

    In order to do something like this (save excel to PDF) you would probably call Excel in batch and somehow call a command there to export the PDF.

    I mean, this is something ore related to Excel than HW commands, as HW Tcl doesn't have any direct access to excel.

    Hello Adriano A. Koga,

    Thanks for the reply.

    Actually i have created on excel sheet using twapi package in tcl. I can save that excel as csv, But i want it in pdf format.

    Regards,

    Sanket

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited August 2021

    Hello Adriano A. Koga,

    Thanks for the reply.

    Actually i have created on excel sheet using twapi package in tcl. I can save that excel as csv, But i want it in pdf format.

    Regards,

    Sanket

    honestly i've never sued twapi (which looks a great extension, by the way).

    I'd say that you might have a better luck seraching at google in this particular case, as it is more a pure TCL question.

    This topic might help you:

    https://stackoverflow.com/questions/48724523/tcl-twapi-excel-write-text-formatting

    Maybe changing the SaveAs command to point to a PDF file.