prueba
// Use this file token to reference the skydrive file in the Excel APIs
var fileToken = “SDD11AA558120622BF!110/-3379206772710038849/t=0&s=0&v=!AIEu6x0QBO90BI8″;
var ewaCht = null;
// Run the Excel load handler on page load.
if (window.attachEvent)
{
window.attachEvent(“onload”, loadEwaOnPageLoad);
} else
{
window.addEventListener(“DOMContentLoaded”, loadEwaOnPageLoad, false);
}
function loadEwaOnPageLoad()
{
var props = {item: “Chart 2″,
uiOptions:
{
showDownloadButton: false,
showGridlines: false,
showRowColumnHeaders: false,
showParametersTaskPane: false
},
interactivityOptions:
{
allowTypingAndFormulaEntry: true,
allowParameterModification: true,
allowSorting: false,
allowFiltering: false,
allowPivotTableInteractivity: false
}
};
// Embed workbook using loadEwaAsync
Ewa.EwaControl.loadEwaAsync(fileToken, “chartDiv”, props, OnChartLoaded);
}
function OnChartLoaded(asyncResult)
{
if (asyncResult.getSucceeded())
{
ewaCht = asyncResult.getEwaControl();
}
}
function SetValuesInSheet()
{
// Get a reference to where we need to write
ewaCht.getActiveWorkbook().getRangeA1Async(‘b1:b2′, getRangeA1Callback, null);
}
function getRangeA1Callback(asyncResult)
{
// getRangeA1Async returns a range object through the AsyncResult object.
var range = asyncResult.getReturnValue();
var values = new Array(2);
values[0] = new Array(1);
values[1] = new Array(1);
var control = document.ChangeInput.Phase;
values[0][0] = control.value;
control = document.ChangeInput.Freq;
values[1][0] = control.value;
// Now send the array to the range.
range.setValuesAsync(values,Dummy,null);
}



