• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Creating files in filestore from Excel post process script

    User help
    2
    5
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      psysak
      last edited by

      Hey, this may seem like a crazy idea but I've reasoned it :)
      Hypothetical question, would it be possible to manipulate the contents of a file from an excel post process script? My excel report currently generates a pretty big report and based on that report I'd like to be able to pull some data out and dump it into individual CSV or Excel files.

      Thoughts?

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hi psysak,

        It is of course possible! CSV would be easier than Excel, since CSV is so akin to text. Something like,

        //untested
        var outputFile = new java.io.File("/path/to/outputFile");
        var writer = null;
        try {
          writer = new java.io.FileWriter( outputFile, false /* append */);
          writer.write("This is a string of output!\n");
        } catch(error) {
          writer.close();
          throw error;
        }
        
        if(writer !== null)
          writer.close();
        
        1 Reply Last reply Reply Quote 0
        • P
          psysak
          last edited by

          As always, thank you sir

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            Certainly! It probably would have been a better answer has I used,

            var outputFile = new java.io.File("/path/to/Mango/filestore/filestoreName/outputFile")
            

            though!

            1 Reply Last reply Reply Quote 0
            • P
              psysak
              last edited by phildunlap

              The @phildunlap answer bot, now with automated self debugging

              1 Reply Last reply Reply Quote 0
              • First post
                Last post