![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
aspose.cells.node
Advanced tools
Aspose.Cells for Node.js via C++ is a high-performance and powerful library for manipulating and converting Excel (XLS, XLSX, XLSB), ODS, CSV, and HTML files, offering a comprehensive set of features for creating, editing, converting, and rendering spread
Aspose.Cells for Node.js via C++ is a powerful and robust library designed for high-performance spreadsheet manipulation and management within Node.js applications. It offers a comprehensive set of features that enable developers to create, edit, convert, and render Excel files programmatically. Supporting all major Excel formats, including XLS, XLSX, XLSM, and more, it ensures compatibility and flexibility. This makes Aspose.Cells for Node.js via C++ a versatile tool for a wide range of data processing and management tasks, providing developers with a complete and efficient solution for integrating comprehensive Excel functionality into their Node.js applications.
const AsposeCells = require("aspose.cells.node");
var workbook = new AsposeCells.Workbook(AsposeCells.FileFormatType.Xlsx);
workbook.getWorksheets().get(0).getCells().get("A1").putValue("Hello World");
workbook.save("hello-world.xlsx");
import AsposeCells from "aspose.cells.node";
const { Workbook, FileFormatType } = AsposeCells;
var workbook = new Workbook(FileFormatType.Xlsx);
workbook.getWorksheets().get(0).getCells().get("A1").putValue("Hello World");
workbook.save("hello-world.xlsx");
Note: Please save the above code as example.mjs file and run it using node example.mjs
.
const { Workbook } = require("aspose.cells.node");
var workbook = new Workbook("example.xlsx");
workbook.save("pdf-example.pdf");
const { Workbook, Color } = require("aspose.cells.node");
var workbook = new Workbook();
var style = workbook.createStyle();
style.getFont().setName("Times New Roman");
var blue = new Color(0, 0, 0xff);
style.getFont().setColor(blue);
for (var i = 0; i < 10; i++) {
var cell = workbook.getWorksheets().get(0).getCells().get(0, i);
cell.putValue(i);
cell.setStyle(style);
}
workbook.save("style-example.xlsx");
const { Workbook, SaveFormat } = require("aspose.cells.node");
var workbook = new Workbook();
var sheetIndex = workbook.getWorksheets().add();
var worksheet = workbook.getWorksheets().get(sheetIndex);
// adding a picture at "F6" cell
worksheet.getPictures().add(5, 5, "image.gif");
workbook.save("picture-example.xls", SaveFormat.Excel97To2003);
const { Workbook, CalculationOptions, AbstractCalculationEngine } = require("aspose.cells.node");
class CustomFunction extends AbstractCalculationEngine {
constructor() {
super();
}
calculate(data) {
var functionName = data.getFunctionName();
if (functionName == "myarrayfunch") {
var r = new Array();
r[0] = [1.0, 2.0, 3.0, 4.0, 5.0];
data.setCalculatedValue(r);
return;
}
else if (functionName == "myarrayfuncv") {
var r = new Array();
r[0] = [1.0];
r[1] = [2.0];
r[2] = [3.0];
r[3] = [4.0];
r[4] = [5.0];
data.setCalculatedValue(r);
return;
}
else if (functionName == "myrange") {
data.setCalculatedValue(data.getWorksheet().getCells().createRange("A1", "F1"));
return;
}
else if (functionName == "UDFTest") {
data.setCalculatedValue(data.getParamValue(0));
}
}
};
var wb = new Workbook();
var sheet = wb.getWorksheets().get(0);
var cells = sheet.getCells();
// Create table with data
var range = cells.createRange("B3:D5");
var arr = new Array();
arr[0] = ["AccountNum", "UDF", "Normal"];
arr[1] = ["Row01", "", ""];
arr[2] = ["Row02", "", ""];
range.setValue(arr);
var firstRow = range.getFirstRow();
var firstColumn = range.getFirstColumn();
var endRow = firstRow + range.getRowCount();
var endColumn = firstColumn + range.getColumnCount();
sheet.getListObjects().add(firstRow, firstColumn, endRow, endColumn, true);
// Populate formulas
cells.get("C5").setFormula("=UDFTest([@AccountNum])");
cells.get("C4").setFormula("=UDFTest([@AccountNum])"); // UDF formula
cells.get("D5").setFormula("=[@AccountNum]");
cells.get("D4").setFormula("=[@AccountNum]"); // Built-in formula comparison
// Calculate workbook
var opt = new CalculationOptions();
var customFunction = new CustomFunction();
opt.setCustomEngine(customFunction);
wb.calculateFormula(opt);
console.log("Row01" == cells.get("C4").getStringValue());
console.log("Row02" == cells.get("C5").getStringValue());
console.log("Row01" == cells.get("D4").getStringValue());
console.log("Row02" == cells.get("D5").getStringValue());
var workbook = new Workbook();
var worksheet = workbook.getWorksheets().get(0);
// Get the cells collection in the sheet
var cells = worksheet.getCells();
cells.get("A1").setArrayFormula("=myarrayfunch()", 1, 5);
cells.get("A2").setArrayFormula("=myarrayfuncv()", 5, 1);
cells.get("A7").setArrayFormula("=A1:E1*100", 1, 5);
cells.get("A8").setFormula("=sum(myrange())", 100);
var cf = new CustomFunction();
var cOpt = new CalculationOptions();
cOpt.setCustomEngine(cf);
workbook.calculateFormula(cOpt);
for (var i = 0; i < 5; i++) {
console.log(i + 1.0 == cells.get(0, i).getDoubleValue());
}
for (var i = 1; i < 6; i++) {
console.log(i == cells.get(i, 0).getDoubleValue());
}
for (var i = 0; i < 5; i++) {
console.log(i * 100 + 100.0 == cells.get(6, i).getDoubleValue());
}
console.log(cells.get("A8").getDoubleValue() == 15);
console.log("done");
Product Page | Product Documentation | Blog |API Reference | Free Support | Temporary License
FAQs
Aspose.Cells for Node.js via C++ is a high-performance and powerful library for manipulating and converting Excel (XLS, XLSX, XLSB), ODS, CSV, and HTML files, offering a comprehensive set of features for creating, editing, converting, and rendering spread
The npm package aspose.cells.node receives a total of 95 weekly downloads. As such, aspose.cells.node popularity was classified as not popular.
We found that aspose.cells.node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.