× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
tariqrahiman reported 2017-06-01T05:03:00Z  · last modified 2017-06-02T19:02:43Z

getAsExcel2003 gives Null Pointer Exception


Dev
Kin-Hong Wong
kin-hong
QA
Tariq Rahiman
tariqrahiman
Priority Major
Complexity Unknown
Component Open API - Data
Version 19.0
Version: 19.0.0-alpha-20
Build #: 54548
Build Date: 2017-May-31 10:02:46 AM
 
getAsExcel2003 gives Null Pointer Exception
 
1. With the latest changes for ADS #15284 the below script to getAsExcel2003 gives Null Pointer Exception
2. Broken in build 19.0.0-alpha-20, Build #: 54548 and Build Date: 2017-May-31 10:02:46 AM
3. Works fine in Version: 19.0.0-alpha-19, Build #: 54539 and Build Date: 2017-May-30 03:47:16 PM
4. Works fine in ADS v18 latest build as well.
 
The default Spreadsheet Format under File > General is Excel 2007
The script is under our Data/AquaScripts/AQDataSet with name getAsExcel2003.xjs. Also attached here
 
AquaScript
==========
 
var dataSet = generateDataSet();
var bytes   = dataSet.getAsExcel2003();
printByteArray(bytes);
 
 
var settings = aqua.data.newDataSetSettings();
var chart    = aqua.chart.newChart();
bytes = dataSet.getAsExcel2003(settings, chart);
 
printByteArray(bytes);
 
 
//------------------------------------------------------------------------------
function generateDataSet(){
 
    var ds = aqua.data.newDataSet(["shipcountry","freight","id"]);
    ds.addRowWithValues(aqua.random.nextCountry(),    "10", "100001");
    ds.addRowWithValues(aqua.random.nextCountry(),   "100", "100002");
    ds.addRowWithValues(aqua.random.nextCountry(),  "1000", "100003");
    ds.addRowWithValues(aqua.random.nextCountry(), "10000", "100004");
    return ds;
}
 
function printByteArray(bytes){
 
    aqua.console.println("Printing Data Set as an array:");
 
    for (var i=0; i<bytes.length; i++){
        aqua.console.print("[" + bytes[i] + "]");
        if ( (i % 50) == 49){
            aqua.console.println("");
        }
    }
}

 

4 attachments

Issue #15290

Closed
Fixed
Resolved 2017-06-02T16:30:48Z
 
 
Completion
No due date
Fixed Build 19.0.0-alpha-25
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017