Limites et différences API

Publique API Différences

La liste suivante (avec des exemples de segments de code) montre certaines différences entre les API Aspose.Cells for Java et Aspose.Cells for Node.js via Java.

Importation de la bibliothèque (comparaisons de packages)

Aspose.Cells for Java

 import com.aspose.cells.*;

Aspose.Cells for Node.js via Java

 var aspose = aspose || {};

aspose.cells = require("aspose.cells");

Instanciation d’un nouveau classeur

Aspose.Cells for Java

 Workbook excelbook = new Workbook();

Aspose.Cells for Node.js via Java

 var excelbook = new aspose.cells.Workbook();

Énumérations ou constantes

Aspose.Cells for Java

 arc2.getLineFormat().setDashStyle(MsoLineDashStyle.SOLID);

Aspose.Cells for Node.js via Java

 arc2.getLineFormat().setDashStyle(aspose.cells.MsoLineDashStyle.SOLID);

Fichiers en continu

Aspose.Cells for Java

 InputStream inputstream = new FileInputStream(Book1.xlsx);

Workbook workbook = new Workbook(inputstream);

workbook.save(result.xlsx);

Aspose.Cells for Node.js via Java

 var aspose = aspose || {};

aspose.cells = require("aspose.cells");

var fs = require("fs");

var readStream = fs.createReadStream("Book1.xlsx");

aspose.cells.Workbook.createWorkbookFromStream(readStream, function(workbook, err) {

    if (err) {

        console.log("open workbook error");

        return;

    }

   workbook.save('result.xlsx');

    console.log('saved to file');

});

Autres limitations de Aspose.Cells for Node.js via Java API par rapport à Aspose.Cells for Java API

  1. L’importation/exportation de données à partir d’un Array, ArrayList, ResultSet, etc. n’est pas prise en charge.
  2. L’impression n’est pas prise en charge.