We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Write variables to csv file

Home Forums Puzzles Write variables to csv file

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #42486
    nmcandre
    Participant

    Hi,
    I have been using the csv file reader puzzle but now I need to write some variables to a csv file. Is it possible? How can I do it?

    Thanks,
    Nuno

    #42497
    xeon
    Customer

    https://www.soft8soft.com/docs/manual/zh/puzzles/Advanced.html#call_external_function

    There is not a write CSV puzzle so you will have to transfer the variables to the parent window and then convert that data to CSV from their I believe.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #42537
    nmcandre
    Participant

    Hi, Xeon.
    Thanks for your help. I will see the information that you shared an try to export to the csv file.
    Regards,
    Nuno

    #42567
    nmcandre
    Participant

    Hi,
    I made some search but didn’t find how to do it. I don’t have skills on JavaScript programming.

    Here is what I am trying to do:

    I have some variables in puzzles like
    dimension1=100
    dimension2=35
    dimension3=20
    ………=…

    Then I need to write a CSV file with this format:
    dimension1;100
    dimension2;35
    dimension3;20
    ……….;..

    This file will be used in a 3D CAD software that uses those parameters to build a 3D Part.

    Any help will be appreciated. :)

    Thanks,
    Nuno

    #42636

    Hi,

    You can use the HTML->download_file puzzle for that, but you need to generate the CSV content first. The puzzle setup may look like this:
    csv.png
    – first you put the variables into a CSV string, which then goes into the download puzzle.

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead developer at Soft8Soft.

    #42638
    nmcandre
    Participant

    Hi, Ivan.

    Thanks for your time and help.

    I will try the solution that you suggested.

    Regards,
    Nuno

    #42640
    nmcandre
    Participant

    Hi, Ivan.

    I tested and it worked fine. Thanks! :)

    Just one more doubt (sorry), is it possible to save the file directly on disk instead of making the download?

    Thank you very much for your help.

    Regards,
    Nuno

    #42708

    Just one more doubt (sorry), is it possible to save the file directly on disk instead of making the download?

    This requires a server configured so that it could receive requests with the file content and save it on the disk.

    But doing something like that from a browser directly on a user machine is not allowed for security reasons.

    Co-founder and lead developer at Soft8Soft.

    #42789
    nmcandre
    Participant

    Hi, Ivan.

    Thanks for your help.

    The idea is to have the file saved on the server, not on the user machine. That information should be used by another software without the user interference. That why the user shouldn’t be using the csv file.

    Regards,
    Nuno

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.