如何使用 IP 地址连接到 SharePoint Online
How to connect to SharePoint Online with IP address
我想知道如何使用 IP 地址成功连接到 spo 服务 url。
Connect-SPOService https://13.xxx.xxx.9-admin.sharepoint.com
使用 kendo.ooxml.Workbook
结合 kendo.saveAs
在按钮 click
上手动触发 Excel 导出怎么样?
我编了一个Kendo Dojo example. Let me know if this is what you need. Additionally, if you need to retrieve the name of your screen, there are some examples of how to do this here
编辑
下面是按下 "Click to Export" 按钮时 Dojo 示例生成的导出示例。请注意,标题是自定义的。
不确定为什么这对您不起作用,但请使用您的代码尝试以下示例,看看会发生什么。基本上,您可以连接自定义函数来处理导出按钮点击,如下所示:
$("#exportButton").kendoButton({
click: function () {
var grid = $("#yourGrid").getKendoGrid();
// declare `rows` and supply your own column names
var rows = [{
cells: [
{ value: "ContactTitle" },
{ value: "CompanyName" },
{ value: "Country" }
]
}];
var trs = grid.dataSource;
// will get any filters applied to grid dataSource
var filteredDataSource = new kendo.data.DataSource({
data: trs.data(),
filter: trs.filter()
});
filteredDataSource.read();
var data = filteredDataSource.view();
for (var i = 0; i < data.length; i++) {
var dataItem = data[i];
rows.push({
cells: [ // dataItem."Whatever Your Attributes Are"
{ value: dataItem.ContactTitle },
{ value: dataItem.CompanyName },
{ value: dataItem.Country }
]
});
}
excelExport(rows);
}
});
这里设置要导出的行,excelExport
函数执行导出:
function excelExport(rows) {
var workbook = new kendo.ooxml.Workbook({
sheets: [
{
columns: [
{ autoWidth: true },
{ autoWidth: true }
],
title: "Name of Tab",
rows: rows
}
]
});
var nameOfPage = "Test-1"; // insert here however you are getting name of screen
kendo.saveAs({ dataURI: workbook.toDataURL(), fileName: nameOfPage + " Export.xlsx" });
}
让我知道结果。
我想知道如何使用 IP 地址成功连接到 spo 服务 url。
Connect-SPOService https://13.xxx.xxx.9-admin.sharepoint.com
使用 kendo.ooxml.Workbook
结合 kendo.saveAs
在按钮 click
上手动触发 Excel 导出怎么样?
我编了一个Kendo Dojo example. Let me know if this is what you need. Additionally, if you need to retrieve the name of your screen, there are some examples of how to do this here
编辑
下面是按下 "Click to Export" 按钮时 Dojo 示例生成的导出示例。请注意,标题是自定义的。
不确定为什么这对您不起作用,但请使用您的代码尝试以下示例,看看会发生什么。基本上,您可以连接自定义函数来处理导出按钮点击,如下所示:
$("#exportButton").kendoButton({
click: function () {
var grid = $("#yourGrid").getKendoGrid();
// declare `rows` and supply your own column names
var rows = [{
cells: [
{ value: "ContactTitle" },
{ value: "CompanyName" },
{ value: "Country" }
]
}];
var trs = grid.dataSource;
// will get any filters applied to grid dataSource
var filteredDataSource = new kendo.data.DataSource({
data: trs.data(),
filter: trs.filter()
});
filteredDataSource.read();
var data = filteredDataSource.view();
for (var i = 0; i < data.length; i++) {
var dataItem = data[i];
rows.push({
cells: [ // dataItem."Whatever Your Attributes Are"
{ value: dataItem.ContactTitle },
{ value: dataItem.CompanyName },
{ value: dataItem.Country }
]
});
}
excelExport(rows);
}
});
这里设置要导出的行,excelExport
函数执行导出:
function excelExport(rows) {
var workbook = new kendo.ooxml.Workbook({
sheets: [
{
columns: [
{ autoWidth: true },
{ autoWidth: true }
],
title: "Name of Tab",
rows: rows
}
]
});
var nameOfPage = "Test-1"; // insert here however you are getting name of screen
kendo.saveAs({ dataURI: workbook.toDataURL(), fileName: nameOfPage + " Export.xlsx" });
}
让我知道结果。