• 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

    Excel Report cannot be opened

    Dashboard Designer & Custom AngularJS Pages
    3
    14
    3.7k
    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.
    • J
      JoHn-Beer
      last edited by JoHn-Beer

      Hi all,
      I can't openan Excel file that has been Loaded. the loaded file format is not the format of the excel file.
      2_1539165351504_Capture2.PNG 1_1539165351504_Capture1.PNG 0_1539165782553_Capture.PNG

      1 Reply Last reply Reply Quote 0
      • CraigWebC
        CraigWeb
        last edited by

        Hi JoHn-Beer

        Have you tried renaming with the .xlsx extension?

        J 1 Reply Last reply Reply Quote 0
        • J
          JoHn-Beer @CraigWeb
          last edited by

          @craigweb Try changing the name to .xlsx. It works.
          Is there no way to change the name?

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

            Hi JoHn-Beer,

            Is there no way to change the name?

            The decision for whether the output file as .xls or .xlsx is done by reading from the uploaded template and determining if it is .xlsx formatted. I would consider,

            1. Opening the template in Excel, doing Save As and being sure it's .xlsx
            2. Trying a newer Apache POI jar
            J 1 Reply Last reply Reply Quote 0
            • J
              JoHn-Beer @phildunlap
              last edited by

              @phildunlap

              1. upload template .xls or .xlsx cannot open
              2. If I try to follow the 2, what do I do?
              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by phildunlap

                upload template .xls or .xlsx cannot open

                If your spreadsheet application cannot open the template I'm suspicious of if a newer POI will help. Did you download it from the edit report page, or did you already have the original version of the template?

                I just checked and it's not a drop in replacement by the looks of things, so the newer POI isn't going to solve it, as it'll cause some runtime exceptions.

                J 1 Reply Last reply Reply Quote 0
                • J
                  JoHn-Beer @phildunlap
                  last edited by

                  @phildunlap I use MangoES v.3.4.4. I'm using this template with other mangoES, I can use it normally.But I used to work with this can not be used normally as I attached the picture.

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

                    Then my suggestion would be to download the template from the first ES, and upload it to the one that isn't working right. Something is wrong in that file with it detecting that it is xlsx and the only solution is to reupload a template that doesn't have the issue, or hacking around it by automating something to rename them to xlsx for you.

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      JoHn-Beer @phildunlap
                      last edited by

                      @phildunlap I have tested it. Create an new excel template file and upload it back to it's not working. I use Firefox browser to load Excel file and it still does not work.0_1539837597827_Capture.PNG

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

                        Hmm. Well, we can look at what sort of file it is being detected as by validating this code in a scripting data source window (change file path)

                        var bufferedStream = null;
                        //Change:
                        var path = "C:\\Path\\To\\Mango\\filestore\\EXCEL_REPORT_TEMPLATES\\your-filename-here.xlsx";
                        try {
                            file = new java.io.File(path);
                            //Pre-3.4, unix slashes
                            //file = new java.io.File("/path/to/Mango/web/modules/excelReports/web/templates/file.xlsx");
                            bufferedStream = new java.io.BufferedInputStream(new java.io.FileInputStream(file));
                            print(org.apache.poi.poifs.filesystem.FileMagic.valueOf(bufferedStream));
                        } finally {
                            if(bufferedStream !== null)
                                bufferedStream.close();
                        }
                        

                        It would print OOXML under the script window if it was detecting it as an .xlsx file.

                        1 Reply Last reply Reply Quote 0
                        • J
                          JoHn-Beer
                          last edited by

                          pic1
                          0_1540441084154_4f22abd5-433c-4012-a925-6323b10b443a-image.png

                          pic2
                          0_1540441114678_b5b4a605-c1b7-4659-9b68-5eae1db7e222-image.png

                          I tried this pic1 and the script print OOXML but I can't dowload excel file like pic2. How can I do it?

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

                            pic2 is not useful. It truncates the filename (and the file extension!) and it is unclear what the icon your computer has for the application that will open it. Is that the icon for no file extension?

                            I also find it odd that you're using text.xlsx when your original question is about a different set of templates. Are no templates working to download? Can you right click on the download template link, copy the address and share what URL (remove your hostname or IP) it's downloading from?

                            J 1 Reply Last reply Reply Quote 0
                            • J
                              JoHn-Beer @phildunlap
                              last edited by

                              @phildunlap Sorry,I may explain the problem incorrectly.The problem I found really was to download the Excel file.
                              Excel file cannot be opened because I download excel file without a file extension.

                              1.I want to know the problem is that MangoES v.3.4.4 or My Computer PC ?
                              2.How can I fix the problem?

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

                                1. Can you check the contents of the /opt/mango/web/modules/excelReports/report-data over SSH or webmin? If there are file extensions there (and looking at the code I cannot imagine there are not) then the issue must either be your computer/browser, or however you're downloading the file. Maybe circle in a screenshot where you're downloading the file from?

                                I was not able to reproduce what you described, and further I cannot see any way in the code for the files on the ES not to have the proper extension, and there is certainly nothing that would be stripping that extension off when you download the file.

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