1. Products
  2.   Spreadsheet
  3.   Node.js
  4.   Aspose.Cells for Node.js via Java

Aspose.Cells for Node.js via Java

 
 

Java API to Generate & Process Spreadsheets

Advanced Node.js API that Enables Developers to Create, Read, Edit, Manipulate & Convert Excel Spreadsheet Formats such as XLS, XLSX, ODS, SpreadsheetML, CSV, TSC & so on.

What is Aspose.Cells for Node.js via Java?

Aspose.Cells for Node.js via Java is a powerful and complete API for managing and manipulating Excel spreadsheets in Node.js applications that use Java. This product is part of the Aspose.Cells family, which is well-known for its comprehensive ability to handle spreadsheet formats. Software Developers can easily create, alter, read, merge and convert Excel files with the robust range of capabilities provided by the library. The library is cross-platform, which means it will work on any operating system that supports Java, ensuring broad compatibility and ease of deployment. It supports popular Microsoft Excel file formats such as XLS, XLSX, XLSB, XLT, XLTX, XLTM, XLSM, XML, OTS, and so on.

Aspose.Cells for Node.js via Java is a sophisticated and feature-rich toolkit for handling various spreadsheet processing tasks in Node.js applications. The library has several important features that make it very useful for software developers, including comprehensive file manipulation, advanced formatting, creating Excel files from scratch, advanced formula calculation, robust charting capabilities, converting Excel files to other file formats, importing and exporting data from various sources, creating and manipulating pivot tables, efficiently handling large datasets, and many more.

Aspose.Cells for Node.js via Java is optimized for performance and can handle huge datasets effectively. It is appropriate for both client and server-side applications where speed and dependability are crucial. Built on Java, the library provides high performance and scalability, making it suited for both small and large-scale applications. It has a variety of additional functionality and security features, such as spreadsheet content encryption and decryption, scenario protection, and the option to hide and unhide rows, columns, worksheets, among others. For software developers wishing to improve their spreadsheet skills, it's a great option all around.

Previous Next

Getting Started with Aspose.Cells for Node.js via Java

The recommend way to install Aspose.Cells for Node.js via Java is using npm. Please use the following command for a smooth installation.

Install Aspose.Cells for Node.js via Java using npm


npm i aspose.cells
You can also download it directly from Aspose product release page.

Excel Spreadsheet Generation in Node.js Apps

Aspose.Cells for Node.js via Java has included complete functionality for creating new spreadsheet documents from scratch as well as load and manipulate existing spreadsheets inside Node.js applications. There are several important features part of the library making developers job easy Software developers can add and remove worksheets, manipulate rows and columns, merge rows and cells, important data from other sheets, insert images and photos, work with cell data directly, advanced formula calculation, and so on. Here is an example that demonstrates how software developers can create a new Excel file inside Node.js applications.

How to Create a New Excel File inside Node.js Applications?

import com.aspose.cells.*;

public class CreateExcelFile {
    public static void main(String[] args) {
        // Instantiate a Workbook object
        Workbook workbook = new Workbook();

        // Access the first worksheet in the workbook
        Worksheet worksheet = workbook.getWorksheets().get(0);

        // Add text to cell A1
        Cell cell = worksheet.getCells().get("A1");
        cell.putValue("Hello, Aspose!");

        // Save the workbook
        try {
            workbook.save("NewExcelFile.xlsx");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Add Charting and Graphics to Spreadsheet

You may create and add different kinds of charts to Excel spreadsheets inside Node.js apps with full support provided by Aspose.Cells for Node.js via Java. The library allows you to modify pre-existing charts inside of.NET applications and create new OOXML charts from scratch. It can accommodate a wide range of chart types, including bar, line, pie, area, column, scatter, surface, stock, radar, and more. Chart Series collection and dealing with the Chart Data Label of a Single ChartSeries are supported by the library. How to include charts in an Excel spreadsheet inside Node.js applications is demonstrated in the example that follows.

How to Add Charts into Excel Worksheet inside Node.js Environment?

import com.aspose.cells.*;

public class AddChart {
    public static void main(String[] args) {
        Workbook workbook = new Workbook();
        Worksheet worksheet = workbook.getWorksheets().get(0);
        Cells cells = worksheet.getCells();

        // Add sample data for the chart
        cells.get("A1").putValue("Category");
        cells.get("A2").putValue("A");
        cells.get("A3").putValue("B");
        cells.get("A4").putValue("C");

        cells.get("B1").putValue("Value");
        cells.get("B2").putValue(10);
        cells.get("B3").putValue(20);
        cells.get("B4").putValue(30);

        // Add a chart to the worksheet
        int chartIndex = worksheet.getCharts().add(ChartType.COLUMN, 5, 0, 15, 5);
        Chart chart = worksheet.getCharts().get(chartIndex);

        // Set the data source for the chart
        chart.setNSeries("B2:B4", true);
        chart.getNSeries().setCategoryData("A2:A4");

        // Save the workbook with the chart
        try {
            workbook.save("ChartExcelFile.xlsx");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Apply Advanced Formatting to Spreadsheets

Aspose.Cells for Node.js via Java makes it easy for software developers to load and apply different kind’s formatting to spreadsheet cells and rows. The library provides extensive formatting options, allowing for customized and visually appealing spreadsheets. It includes font styles, cell borders, number formats, and conditional formatting, allowing for highly customized and visually appealing spreadsheets. This includes font styles, cell borders, number formats, and conditional formatting. Here is a simple example that shows how software developers can apply formatting to worksheet cells inside Node.js applications.

How to Apply Styles to Worksheet Cells inside Node.js Apps?

import com.aspose.cells.*;

public class FormatCells {
    public static void main(String[] args) {
        try {
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.getWorksheets().get(0);
            Cells cells = worksheet.getCells();

            // Set value to a cell
            Cell cell = cells.get("A1");
            cell.putValue("Aspose Formatting");

            // Create a style object
            Style style = workbook.createStyle();
            // Set the font color to red
            style.getFont().setColor(Color.getRed());
            // Set the background color to yellow
            style.setPattern(BackgroundType.SOLID);
            style.setBackgroundColor(Color.getYellow());

            // Apply the style to the cell
            cell.setStyle(style);

            workbook.save("FormattedCells.xlsx");
            System.out.println("Cells formatted successfully.");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} 

Convert Excel Spreadsheet via Node.js API

Aspose.Cells for Node.js via Java has provided complete functionality for converting Excel spreadsheet between numerous file formats. Software developers can use the library to load Excel spreadsheets in one file format into their.NET applications and save them in a variety of other supported file formats. Excel Spreadsheet conversion to PDF, HTML, PowerPoint, XPS, HTML, MHTML, JSON, Plain Text, and common picture formats including TIFF, JPG, PNG, BMP, and SVG is supported by the library. Here is a simple example that shows how developer can efficiently convert Excel spreadsheets to PDF inside Node.js applications.

How to Convert Excel Spreadsheets to PDF inside Node.js Apps?

import com.aspose.cells.*;

public class ExcelToPdf {
    public static void main(String[] args) {
        try {
            // Load the Excel file
            Workbook workbook = new Workbook("input.xlsx");

            // Save the file as PDF
            workbook.save("output.pdf", SaveFormat.PDF);

            System.out.println("Excel file has been successfully converted to PDF.");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}