none
Loss of Precision from Model Class to Excel Worksheet RRS feed

  • Question

  • I suspect I am not using the tableOptions syntax properly. Decimals out to 15 digits are being truncated. I note that in the excel manual custom format precision appears to be available out to 14 digits.

    Any clues appreciated , I also need to set column width to the amount necessary to show the digits. I admit 15 digits are a lot. This is interest rate data. Thanks for any assistance.

    //write the TableData to Excel
            function setExcelData(officeTable) {
                if (officeTable != null) {
                    Office.context.document.setSelectedDataAsync(officeTable, { coercionType: Office.CoercionType.Table , tableOptions:  {numberFormat: "##.###############"}} , function (asyncResult) {
                        if (asyncResult.status == Office.AsyncResultStatus.Failed) {
                            app.showNotification('Failure '+ asyncResult.error) ;
                        }
                        else {
                            app.showNotification('Success');
                        }
                    });
                }
            }


    Doyle

    Monday, April 6, 2015 5:18 PM

Answers