Tag: sapui5

如何使用ajax调用+ javascript将数据从数据库导出到excel中

我使用sapui5 _javascript创build了一个NDWS应用程序。 我有一个表中的视图,其中有一些数据(数据与服务器上的数据库同步)。 我想从表中检索数据并导入到Excel中(所以得到单独的Excel文档)。 这是我的触发器: var oExportToExcelButton = new sap.ui.commons.Button( { text : "Export to Excel", width : '120px', style : sap.ui.commons.ButtonStyle.Emph, press : function() { var jsonDataObject = oController.model.getProperty("/matreqs"); var taskIdFromView = sap.ui.getCore().byId("taskId").getValue(); var jsonData = JSON.stringify(jsonDataObject); $.ajax("api/wpi/processrequest/getexcelexportfile?taskId=" + taskIdFromView, { context : this, type : "POST", processData : false, contentType : "application/json", data […]

格式化程序parameter passing为null

我正试图将表格数据导出到Excel工作表。 一切正常,没有格式化。 但是在将表格转换为Excel之前,我必须格式化一些单元格。 我正在debugging代码。 格式化函数的参数作为空值传递。 这是我的代码: var oExport = new sap.ui.core.util.Export({ exportType: new sap.ui.core.util.ExportTypeCSV({ separatorChar: ";" }), models: this.getView().getModel(), rows: { path: "/FaaliyetServisiSet" }, columns: [{ name: "Kişi", template: { content: "{Klnad}" } }, { name: "Faaliyet", template: { content: "{Falyt}" } }, { name: "Süre", template: { content: { parts: ["Sure"], formatter: function(oValue) { […]