我使用SAPUI5 FileUploader组件上传* .xlsx文件。当我尝试上传* .xlsx文件时,它在本地浏览器或客户端浏览器(安装了Microsoft Excel)上运行良好,但在未安装Microsoft Excel的客户端位置上出现“错误的文件类型”错误。 所以我的问题是,我们是否需要安装Microsoft Excel,或者它可以在不安装Microsoft Excel的情况下工作?
这是代码:
this.oFileUploader = new sap.ui.unified:FileUploader({
id: "fileUploaderId",
// uploadUrl: "", // We are setting at runtime
// headers: oHeaders,
multiple: false,
name: "file",
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
fileType: "xlsx",
maximumFileSize: 1024,
endXHR: true,
uploadOnChange: false,
typeMissmatch :function (oEvent) {
controllerObj.typeMissmatch(oEvent);
},
fileSizeExceed :function (oEvent) {
controllerObj.fileSizeExceed(oEvent);
},
uploadComplete:function( oEvent ) {
controllerObj.uploadComplete( oEvent );
}});