0

CreateXLSX not working

I can't get the CreateXLSX function to work, at all - on Ninox v3.17.13 (Mac OS Tahoe)..

I tried with field names, and couldn't get it to work, so tried static hard coded data - in fact, straight from the official Ninox documentation (correcting the missing ':' before the =):

let columns := [{
            header: "Name",
            key: "name",
            width: 10
        }, {
            header: "Age",
            key: "age",
            width: 10
        }, {
            header: "URL",
            key: "url",
            width: 30
        }, {
            header: "Description",
            key: "description",
            width: 20
        }];
let rows := [{
            name: "Luis Gómez",
            age: 30,
            url: {
                text: "www.google.com",
                hyperlink: "http://www.google.com",
                tooltip: "www.google.com"
            }
        }, {
            name: "Maria Silva",
            age: 25,
            url: {
                text: "www.google.com",
                hyperlink: "http://www.google.com",
                tooltip: "www.google.com"
            }
        }, {
            name: "Ayesha Khan",
            age: 35,
            url: {
                text: "www.google.com",
                hyperlink: "http://www.google.com",
                tooltip: "www.google.com"
            }
        }, {
            name: "Li Wei",
            age: 40,
            url: {
                text: "www.google.com",
                hyperlink: "http://www.google.com",
                tooltip: "www.google.com"
            }
        }, {
            name: "Rajesh Kumar",
            age: 21,
            url: {
                text: "www.google.com",
                hyperlink: "http://www.google.com",
                tooltip: "www.google.com"
            }
        }, {
            name: "Sofia Müller",
            age: 24,
            url: {
                text: "www.google.com",
                hyperlink: "http://www.google.com",
                tooltip: "www.google.com"
            }
        }];
let worksheets := {
        Sheet1: {
            columns: columns,
            rows: rows
        }
    };
Image := createXLSX(this, worksheets, "example.xlsx")

but although the image field gets populated with the 'example.xlsx' file, I can't save it, or open it in the editor - I get "Network Failed" error message if I try the 'open in editor' from the hamburger button in the Image field, and 'failed to copy file to: Users/Jason Sheldon/Desktop/example.xlsx' error if I try to save it..

Any idea what could be wrong?

Thanks,

Jason

1 reply

null
    • Rafael Sanchis
    • Rafael_Sanchis
    • 4 days ago
    • Reported - view

    let rows := (select 'WS-DATA EVM').{

      'Date CutOff': text(format('Date CutOff', "DD.MMM.YY")),

      'Progress Plan': format('Progress Plan', "#.00") + " %",

      'Progress Real': format('Progress Real', "#.00") + " %",

      Desviation: format(Desviation, "#.00") + " %",

      'Planned Value PV': format('Planned Value PV', "#,##0.00 €"),

      'Earned Value EV': format('Earned Value EV', "#,##0.00 €"),

      CPI: format(CPI, "#.00"),

      SPI: format(SPI, "#.00")

     };

     

    Each field separate.

    In you case

    let rows :=  (select YOURTABLE)
    name: Name,
            age: Age,
            url: {
                text: URL,
                hyperlink: URL,
                tooltip: URL
            },
            description: Description
     

Content aside

  • 4 days agoLast active
  • 1Replies
  • 30Views
  • 2 Following