on 2016 Aug 23 3:47 AM
Hello Friends,
I am reading the data from excel using "FileUploader". its working fine. Now my requirement is if excel file is opened it should not allowed. when excel file is closed then only its will allowed. how to do this
<Label id="fileNameId" text="File Upload" required="true"/>
<u:FileUploader id="fileUploader" name="FILENAME" placeholder="Upload your file to the SAP System"
change="processFile" sameFilenameAllowed="false" liveChange="onSelectInput" width="350px"/>
Regards
Vijay
Hi Zun,
Good day.
PFB Steps which is i implemented during that time.
1) Import "xlsx.js" into project and add that in manifest.json under resource.PFB screen shot for your reference.
2) Go to corresponding controller.js and View add below code.
View Code:
<Label id="fileNameId" text="File Upload" required="true"/>
<u:FileUploader id="fileUploader" name="FILENAME" placeholder="Upload your file to the SAP System" change="processFile" sameFilenameAllowed="false" liveChange="onSelectInput" width="350px"/>
Controller.JS
/*global location */
var tableModel;
var X = XLSX;
var view;
var excelFileDatatable;
var oExcelLineItems = [];
var XW = {
/* worker message */
msg: 'xlsx',
/* worker scripts */
rABS: './xlsxworker2.js',
norABS: './xlsxworker1.js',
noxfer: './xlsxworker.js'
};
You can write the "processFile" method code. PFA document.
export-excel-code.txt
Hope this should be help full for you.
Best Regards
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
12 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.