Hướng dẫn how do you insert data into excel using javascript? - làm thế nào để bạn chèn dữ liệu vào excel bằng cách sử dụng javascript?

Bỏ qua nội dung chính

Trình duyệt này không còn được hỗ trợ.

Nâng cấp lên Microsoft Edge để tận dụng các tính năng mới nhất, cập nhật bảo mật và hỗ trợ kỹ thuật.

Chèn một loạt các ô bằng cách sử dụng API JavaScript Excel

  • Bài báo
  • 03/22/2022
  • 2 phút để đọc

Trong bài viết này

Bài viết này cung cấp một mẫu mã chèn một loạt các ô với API JavaScript Excel. Để biết danh sách đầy đủ các thuộc tính và phương thức mà đối tượng

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
7 hỗ trợ, hãy xem lớp excel.range.

Ghi chú

API JavaScript Excel không có đối tượng hoặc lớp "ô". Thay vào đó, API JavaScript Excel xác định tất cả các ô Excel là đối tượng

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
7. Một ô riêng lẻ trong UI Excel chuyển thành đối tượng
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
7 với một ô trong API JavaScript Excel. Một đối tượng
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
7 cũng có thể chứa nhiều ô tiếp giáp. Xem công việc với các ô bằng API JavaScript Excel để tìm hiểu thêm.

Chèn một loạt các ô

Mẫu mã sau đây chèn một loạt các ô ở vị trí B4: E4 và chuyển các ô khác xuống để cung cấp không gian cho các ô mới.B4:E4 and shifts other cells down to provide space for the new cells.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let range = sheet.getRange["B4:E4"];

    range.insert[Excel.InsertShiftDirection.down];

    await context.sync[];
}];

Dữ liệu trước phạm vi được chèn

Dữ liệu sau phạm vi được chèn

Xem thêm

  • Mô hình đối tượng JavaScript Excel trong các tiện ích bổ sung văn phòng
  • Làm việc với các tế bào bằng cách sử dụng API JavaScript Excel
  • Xóa hoặc xóa phạm vi bằng API JavaScript Excel

Nhận xét

Gửi và xem phản hồi cho

Bỏ qua nội dung chính

Trình duyệt này không còn được hỗ trợ.

Nâng cấp lên Microsoft Edge để tận dụng các tính năng mới nhất, cập nhật bảo mật và hỗ trợ kỹ thuật.

Làm việc với các bảng bằng API JavaScript Excel

  • Bài báo
  • 05/20/2022
  • 11 phút để đọc

Trong bài viết này

Bài viết này cung cấp các mẫu mã cho thấy cách thực hiện các tác vụ phổ biến với các bảng bằng API JavaScript Excel. Để biết danh sách đầy đủ các thuộc tính và phương thức mà các đối tượng

// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
1 và
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
2 hỗ trợ, hãy xem đối tượng bảng [API JavaScript cho Excel] và đối tượng TableCollection [API JavaScript cho Excel].

Tạo một bảng

Mẫu mã sau đây tạo ra một bảng trong bảng tính có tên mẫu. Bảng có các tiêu đề và chứa bốn cột và bảy hàng dữ liệu. Nếu ứng dụng Excel trong đó mã đang chạy hỗ trợ yêu cầu, đặt Excelapi 1.2, chiều rộng của các cột và chiều cao của các hàng được đặt để phù hợp nhất với dữ liệu hiện tại trong bảng.Sample. The table has headers and contains four columns and seven rows of data. If the Excel application where the code is running supports requirement set ExcelApi 1.2, the width of the columns and height of the rows are set to best fit the current data in the table.

Ghi chú

Để chỉ định tên cho một bảng, trước tiên bạn phải tạo bảng và sau đó đặt thuộc tính

// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
3 của nó, như trong ví dụ sau.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];

Bảng mới

Thêm hàng vào bảng

Mẫu mã sau đây thêm bảy hàng mới vào bảng có tên là ExpenseStable trong bảng tính có tên mẫu. Tham số

// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
4 của phương thức
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
5 được đặt thành
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
6, trong đó chỉ định rằng các hàng được thêm vào sau các hàng hiện có trong bảng. Tham số
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
7 được đặt thành
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
8, chỉ ra rằng các hàng mới được chèn vào bảng, không phải bên dưới bảng. Chiều rộng của các cột và chiều cao của các hàng sau đó được đặt để phù hợp nhất với dữ liệu hiện tại trong bảng.ExpensesTable within the worksheet named Sample. The
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
4 parameter of the
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
5 method is set to
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
6, which specifies that the rows be added after the existing rows in the table. The
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
7 parameter is set to
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
8, which indicates that the new rows be inserted into the table, not below the table. The width of the columns and height of the rows are then set to best fit the current data in the table.

Ghi chú

Để chỉ định tên cho một bảng, trước tiên bạn phải tạo bảng và sau đó đặt thuộc tính

// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
3 của nó, như trong ví dụ sau.

// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];

Bảng mới

Thêm hàng vào bảng

Mẫu mã sau đây thêm bảy hàng mới vào bảng có tên là ExpenseStable trong bảng tính có tên mẫu. Tham số

// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
4 của phương thức
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
5 được đặt thành
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
6, trong đó chỉ định rằng các hàng được thêm vào sau các hàng hiện có trong bảng. Tham số
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
7 được đặt thành
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
8, chỉ ra rằng các hàng mới được chèn vào bảng, không phải bên dưới bảng. Chiều rộng của các cột và chiều cao của các hàng sau đó được đặt để phù hợp nhất với dữ liệu hiện tại trong bảng.

Ghi chú

Để chỉ định tên cho một bảng, trước tiên bạn phải tạo bảng và sau đó đặt thuộc tính

// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
3 của nó, như trong ví dụ sau.index property of a TableColumn object indicates the index number of the column within the columns collection of the table. The id property of a TableColumn object contains a unique key that identifies the column.

Bảng mới

Thêm hàng vào bảngExpensesTable within the worksheet named Sample. The new column is added after all existing columns in the table and contains a header ["Day of the Week"] as well as data to populate the cells in the column. The width of the columns and height of the rows are then set to best fit the current data in the table.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];

Mẫu mã sau đây thêm bảy hàng mới vào bảng có tên là ExpenseStable trong bảng tính có tên mẫu. Tham số
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
4 của phương thức
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
5 được đặt thành
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
6, trong đó chỉ định rằng các hàng được thêm vào sau các hàng hiện có trong bảng. Tham số
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
7 được đặt thành
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
8, chỉ ra rằng các hàng mới được chèn vào bảng, không phải bên dưới bảng. Chiều rộng của các cột và chiều cao của các hàng sau đó được đặt để phù hợp nhất với dữ liệu hiện tại trong bảng.

Thuộc tính
// This code sample shows how to add rows to a table that already exists 
// on a worksheet named Sample.
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.rows.add[
        null, // index, Adds rows to the end of the table.
        [
            ["1/16/2017", "THE PHONE COMPANY", "Communications", "$120"],
            ["1/20/2017", "NORTHWIND ELECTRIC CARS", "Transportation", "$142"],
            ["1/20/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$27"],
            ["1/21/2017", "COHO VINEYARD", "Restaurant", "$33"],
            ["1/25/2017", "BELLOWS COLLEGE", "Education", "$350"],
            ["1/28/2017", "TREY RESEARCH", "Other", "$135"],
            ["1/31/2017", "BEST FOR YOU ORGANICS COMPANY", "Groceries", "$97"]
        ], 
        true, // alwaysInsert, Specifies that the new rows be inserted into the table.
    ];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
4 của đối tượng Tablerow cho biết số chỉ mục của hàng trong bộ sưu tập hàng của bảng. Đối tượng
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
0 không chứa thuộc tính
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
1 có thể được sử dụng làm khóa duy nhất để xác định hàng.

Bảng với các hàng mớiExpensesTable within the worksheet named Sample. The new column is added to the end of the table, contains a header ["Type of the Day"], and uses a formula to populate each data cell in the column. The width of the columns and height of the rows are then set to best fit the current data in the table.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Type of the Day"],
        ['=IF[OR[[TEXT[[DATE], "dddd"] = "Saturday"], [TEXT[[DATE], "dddd"] = "Sunday"]], "Weekend", "Weekday"]'],
        ['=IF[OR[[TEXT[[DATE], "dddd"] = "Saturday"], [TEXT[[DATE], "dddd"] = "Sunday"]], "Weekend", "Weekday"]'],
        ['=IF[OR[[TEXT[[DATE], "dddd"] = "Saturday"], [TEXT[[DATE], "dddd"] = "Sunday"]], "Weekend", "Weekday"]'],
        ['=IF[OR[[TEXT[[DATE], "dddd"] = "Saturday"], [TEXT[[DATE], "dddd"] = "Sunday"]], "Weekend", "Weekday"]'],
        ['=IF[OR[[TEXT[[DATE], "dddd"] = "Saturday"], [TEXT[[DATE], "dddd"] = "Sunday"]], "Weekend", "Weekday"]'],
        ['=IF[OR[[TEXT[[DATE], "dddd"] = "Saturday"], [TEXT[[DATE], "dddd"] = "Sunday"]], "Weekend", "Weekday"]'],
        ['=IF[OR[[TEXT[[DATE], "dddd"] = "Saturday"], [TEXT[[DATE], "dddd"] = "Sunday"]], "Weekend", "Weekday"]']
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];

Thêm một cột vào bảng

Những ví dụ này cho thấy cách thêm một cột vào một bảng. Ví dụ đầu tiên điền vào cột mới với các giá trị tĩnh; Ví dụ thứ hai điền vào cột mới với các công thức.

Thuộc tính chỉ mục của một đối tượng ChableColumn cho biết số chỉ mục của cột trong bộ sưu tập cột của bảng. Thuộc tính ID của một đối tượng bảng tính chứa một khóa duy nhất xác định cột.ExpensesTable from the Create a table section earlier in this article and sets the new range of the table to A1:D20.

await Excel.run[async [context] => {
    // Retrieve the worksheet and a table on that worksheet.
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    // Resize the table.
    expensesTable.resize["A1:D20"];

    await context.sync[];
}];

Thêm một cột chứa các giá trị tĩnh

Mẫu mã sau đây thêm một cột mới vào bảng có tên ExpenseStable trong bảng tính có tên mẫu. Cột mới được thêm vào sau tất cả các cột hiện có trong bảng và chứa một tiêu đề ["Ngày trong tuần"] cũng như dữ liệu để điền các ô trong cột. Chiều rộng của các cột và chiều cao của các hàng sau đó được đặt để phù hợp nhất với dữ liệu hiện tại trong bảng.

Bảng có cột mới

Thêm một cột chứa các công thức

Mẫu mã sau đây thêm một cột mới vào bảng có tên ExpenseStable trong bảng tính có tên mẫu. Cột mới được thêm vào cuối bảng, chứa một tiêu đề ["loại trong ngày"] và sử dụng một công thức để điền vào từng ô dữ liệu trong cột. Chiều rộng của các cột và chiều cao của các hàng sau đó được đặt để phù hợp nhất với dữ liệu hiện tại trong bảng.Purchase date. The width of the columns and height of the rows are then set to best fit the current data in the table.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];

    let expensesTable = sheet.tables.getItem["ExpensesTable"];
    expensesTable.columns.load["items"];

    await context.sync[];
        
    expensesTable.columns.items[0].name = "Purchase date";

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];

Bảng với cột được tính toán mới

Thay đổi kích thước một cái bàn

Bổ trợ của bạn có thể thay đổi kích thước bảng mà không cần thêm dữ liệu vào bảng hoặc thay đổi giá trị ô. Để thay đổi kích thước một bảng, sử dụng phương thức bảng.resize. Mẫu mã sau đây cho thấy cách thay đổi kích thước bảng. Mẫu mã này sử dụng phần mở rộng từ phần Tạo một bảng trước đó trong bài viết này và đặt phạm vi mới của bảng thành A1: D20.ExpensesTable in the worksheet named Sample and then outputs that data below the table in the same worksheet.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    // Get data from the header row.
    let headerRange = expensesTable.getHeaderRowRange[].load["values"];

    // Get data from the table.
    let bodyRange = expensesTable.getDataBodyRange[].load["values"];

    // Get data from a single column.
    let columnRange = expensesTable.columns.getItem["Merchant"].getDataBodyRange[].load["values"];

    // Get data from a single row.
    let rowRange = expensesTable.rows.getItemAt[1].load["values"];

    // Sync to populate proxy objects with data from Excel.
    await context.sync[];

    let headerValues = headerRange.values;
    let bodyValues = bodyRange.values;
    let merchantColumnValues = columnRange.values;
    let secondRowValues = rowRange.values;

    // Write data from table back to the sheet
    sheet.getRange["A11:A11"].values = [["Results"]];
    sheet.getRange["A13:D13"].values = headerValues;
    sheet.getRange["A14:D20"].values = bodyValues;
    sheet.getRange["B23:B29"].values = merchantColumnValues;
    sheet.getRange["A32:D32"].values = secondRowValues;

    // Sync to update the sheet in Excel.
    await context.sync[];
}];

Đầu ra bảng và dữ liệu

Phát hiện thay đổi dữ liệu

Bổ trợ của bạn có thể cần phản ứng với người dùng thay đổi dữ liệu trong bảng. Để phát hiện những thay đổi này, bạn có thể đăng ký một trình xử lý sự kiện cho sự kiện

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
2 của bảng. Trình xử lý sự kiện cho sự kiện
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
2 nhận được một đối tượng TableChangedEventArgs khi sự kiện bị bắn.

Đối tượng

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
4 cung cấp thông tin về các thay đổi và nguồn. Vì
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
2 bắn khi định dạng hoặc giá trị của các thay đổi dữ liệu, nên có thể hữu ích khi kiểm tra bổ trợ của bạn nếu các giá trị đã thực sự thay đổi. Tài sản
await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
6 gói gọn thông tin này như một thay đổi. Mẫu mã sau đây cho thấy cách hiển thị các giá trị trước và sau và các loại ô đã được thay đổi.

// This function would be used as an event handler for the Table.onChanged event.
async function onTableChanged[eventArgs] {
    await Excel.run[async [context] => {
        let details = eventArgs.details;
        let address = eventArgs.address;

        // Print the before and after types and values to the console.
        console.log[`Change at ${address}: was ${details.valueBefore}[${details.valueTypeBefore}],`
            + ` now is ${details.valueAfter}[${details.valueTypeAfter}]`];
        await context.sync[];
    }];
}

Sắp xếp dữ liệu trong bảng

Mã mẫu sau đây sắp xếp dữ liệu bảng theo thứ tự giảm dần theo các giá trị trong cột thứ tư của bảng.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    // Queue a command to sort data by the fourth column of the table [descending].
    let sortRange = expensesTable.getDataBodyRange[];
    sortRange.sort.apply[[
        {
            key: 3,
            ascending: false,
        },
    ]];

    // Sync to run the queued command in Excel.
    await context.sync[];
}];

Dữ liệu bảng được sắp xếp theo số lượng [giảm dần]

Khi dữ liệu được sắp xếp trong một bảng tính, một thông báo sự kiện sẽ bắn. Để tìm hiểu thêm về các sự kiện liên quan đến sắp xếp và cách bổ trợ của bạn có thể đăng ký trình xử lý sự kiện để ứng phó với các sự kiện đó, hãy xem xử lý các sự kiện sắp xếp.

Áp dụng các bộ lọc vào bảng

Mẫu mã sau đây áp dụng các bộ lọc cho cột số lượng và cột danh mục trong bảng. Do kết quả của các bộ lọc, chỉ có các hàng trong đó danh mục là một trong những giá trị và lượng được chỉ định dưới giá trị trung bình cho tất cả các hàng được hiển thị.Amount column and the Category column within a table. As a result of the filters, only rows where Category is one of the specified values and Amount is below the average value for all rows is shown.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
0

Dữ liệu bảng với các bộ lọc được áp dụng cho danh mục và số lượng

Bộ lọc bảng rõ ràng

Mẫu mã sau đây xóa bất kỳ bộ lọc nào hiện được áp dụng trên bảng.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
1

Dữ liệu bảng không có bộ lọc được áp dụng

Nhận phạm vi hiển thị từ bảng được lọc

Mẫu mã sau đây nhận được một phạm vi chỉ chứa dữ liệu cho các ô hiện đang hiển thị trong bảng được chỉ định và sau đó ghi các giá trị của phạm vi đó vào bảng điều khiển. Bạn có thể sử dụng phương thức

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
7 như được hiển thị bên dưới để có được nội dung hiển thị của bảng bất cứ khi nào các bộ lọc cột được áp dụng.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
2

Bộ lọc tự động

Một bổ trợ có thể sử dụng đối tượng tự động lọc của bảng để lọc dữ liệu. Đối tượng

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
8 là toàn bộ cấu trúc bộ lọc của bảng hoặc phạm vi. Tất cả các hoạt động của bộ lọc được thảo luận trước đó trong bài viết này đều tương thích với bộ lọc tự động. Điểm truy cập duy nhất giúp dễ dàng truy cập và quản lý nhiều bộ lọc hơn.

Mẫu mã sau đây hiển thị cùng một bộ lọc dữ liệu như mẫu mã trước đó, nhưng được thực hiện hoàn toàn thông qua bộ lọc tự động.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
3

Một

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.getItem["ExpensesTable"];

    expensesTable.columns.add[null /*add columns to the end of the table*/, [
        ["Day of the Week"],
        ["Saturday"],
        ["Friday"],
        ["Monday"],
        ["Thursday"],
        ["Sunday"],
        ["Saturday"],
        ["Monday"]
    ]];

    sheet.getUsedRange[].format.autofitColumns[];
    sheet.getUsedRange[].format.autofitRows[];

    await context.sync[];
}];
8 cũng có thể được áp dụng cho một phạm vi ở cấp bảng tính. Xem công việc với bảng tính bằng cách sử dụng API JavaScript Excel để biết thêm thông tin.

Định dạng một bảng

Mẫu mã sau đây áp dụng định dạng cho một bảng. Nó chỉ định các màu điền khác nhau cho hàng tiêu đề của bảng, phần thân của bảng, hàng thứ hai của bảng và cột đầu tiên của bảng. Để biết thông tin về các thuộc tính bạn có thể sử dụng để chỉ định định dạng, hãy xem RangeFormat Object [API JavaScript cho Excel].

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
4

Bảng sau khi định dạng được áp dụng

Chuyển đổi một phạm vi thành bảng

Mẫu mã sau đây tạo ra một phạm vi dữ liệu và sau đó chuyển đổi phạm vi đó thành bảng. Chiều rộng của các cột và chiều cao của các hàng sau đó được đặt để phù hợp nhất với dữ liệu hiện tại trong bảng.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
5

Dữ liệu trong phạm vi [trước khi phạm vi được chuyển đổi thành bảng]

Dữ liệu trong bảng [sau khi phạm vi được chuyển đổi thành bảng]

Nhập dữ liệu JSON vào bảng

Mẫu mã sau đây tạo một bảng trong bảng tính có tên mẫu và sau đó điền vào bảng bằng cách sử dụng đối tượng JSON xác định hai hàng dữ liệu. Chiều rộng của các cột và chiều cao của các hàng sau đó được đặt để phù hợp nhất với dữ liệu hiện tại trong bảng.Sample and then populates the table by using a JSON object that defines two rows of data. The width of the columns and height of the rows are then set to best fit the current data in the table.

await Excel.run[async [context] => {
    let sheet = context.workbook.worksheets.getItem["Sample"];
    let expensesTable = sheet.tables.add["A1:D1", true /*hasHeaders*/];
    expensesTable.name = "ExpensesTable";

    expensesTable.getHeaderRowRange[].values = [["Date", "Merchant", "Category", "Amount"]];

    expensesTable.rows.add[null /*add rows to the end of the table*/, [
        ["1/1/2017", "The Phone Company", "Communications", "$120"],
        ["1/2/2017", "Northwind Electric Cars", "Transportation", "$142"],
        ["1/5/2017", "Best For You Organics Company", "Groceries", "$27"],
        ["1/10/2017", "Coho Vineyard", "Restaurant", "$33"],
        ["1/11/2017", "Bellows College", "Education", "$350"],
        ["1/15/2017", "Trey Research", "Other", "$135"],
        ["1/15/2017", "Best For You Organics Company", "Groceries", "$97"]
    ]];

    if [Office.context.requirements.isSetSupported["ExcelApi", "1.2"]] {
        sheet.getUsedRange[].format.autofitColumns[];
        sheet.getUsedRange[].format.autofitRows[];
    }

    sheet.activate[];

    await context.sync[];
}];
6

Bảng mới

Xem thêm

  • Mô hình đối tượng JavaScript Excel trong các tiện ích bổ sung văn phòng

Nhận xét

Gửi và xem phản hồi cho

Làm thế nào để bạn viết dữ liệu vào Excel bằng JavaScript?

Cách nhập và xuất Excel XLSX bằng JavaScript..
Thiết lập dự án bảng tính JavaScript ..
Thêm mã nhập excel ..
Thêm dữ liệu vào tệp Excel đã nhập ..
Thêm một tia lửa ..
Thêm mã xuất excel ..

JavaScript có thể thao túng excel không?

API JavaScript Excel có thể tạo và thao tác các cấu trúc dữ liệu và trực quan hóa trong Excel.Các bảng và biểu đồ là hai trong số các đối tượng được sử dụng phổ biến hơn, nhưng API hỗ trợ pivottables, hình dạng, hình ảnh, v.v.. Tables and charts are two of the more commonly used objects, but the APIs support PivotTables, shapes, images, and more.

Bạn có thể tự động hóa Excel với JavaScript không?

Jade cung cấp cho bạn sức mạnh để sử dụng JavaScript để tự động hóa mọi thứ trong phạm vi sổ làm việc của Excel mà không làm cho nó được bật macro.Bởi vì JavaScript bạn viết đang sống trong trình duyệt, nó không có quyền truy cập vào bất kỳ tính năng hệ điều hành nào trên máy tính chủ.. Because the JavaScript you write is living in a browser, it does not have access to any operating system features on the host computer.

Làm thế nào để bạn chèn dữ liệu vào excel?

Trên tab Chèn, trong nhóm văn bản, nhấp vào Object. Bấm vào Tab Tab Forges. Bấm và chọn tệp bạn muốn chèn.Nếu bạn muốn chèn một biểu tượng vào bảng tính thay vì hiển thị nội dung của tệp, hãy chọn hộp kiểm Biểu tượng hiển thị. Click the Create from File tab. Click Browse, and select the file you want to insert. If you want to insert an icon into the spreadsheet instead of show the contents of the file, select the Display as icon check box.

Bài Viết Liên Quan

Chủ Đề