Node.js ile C++ kullanarak İş Sayfasındaki hücre sayısını sayma
Contents
[
Hide
]
Aşağıdaki örnekte verilen kod örneğinde gösterildiği gibi, çalışma sayfasındaki hücre sayısını Cells.getCount() veya Cells.getCountLarge() özelliklerini kullanarak sayabilirsiniz.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// Source directory
const sourceDir = path.join(__dirname, "data");
// Load source Excel file
const filePath = path.join(sourceDir, "BookWithSomeData.xlsx");
const workbook = new AsposeCells.Workbook(filePath);
// Access first worksheet
const worksheet = workbook.getWorksheets().get(0);
// Print number of cells in the Worksheet
console.log("Number of Cells: " + worksheet.getCells().getCount());
// If the number of cells is greater than 2147483647, use CountLarge
console.log("Number of Cells (CountLarge): " + worksheet.getCells().getCountLarge());