Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
How read excel file from file cabinet
i can read CSV file properly
but getting different format when trying to read excel file
i have tried following source code
{
//excel file read - showing incorrect format
var fileObj = nlapiLoadFile(4452);
var fileName = fileObj.getName();
var filedValue = fileObj.getValue();
var decodeFile = decode_base64(filedValue);
//CSV file read - showing proper format
var fileObj = nlapiLoadFile(4453);
var fileName = fileObj.getName();
var filedValue = fileObj.getValue();
var decodeFile = decode_base64(filedValue);
}
function decode_base64(s){
var e = {}, i, k, v = [], r = '', w = String.fromCharCode;
var n = [[65, 91], [97, 123], [48, 58], [47, 48], [43, 44]];
for (z in n) {
for (i = n[z][0]; i < n[z][1]; i++) {
v.push(w(i));