UPDATE: Add raw API to nodejs bindings

This commit is contained in:
Nicolás Hatcher
2025-01-28 20:08:16 +01:00
committed by Nicolás Hatcher Andrés
parent 24fb87721f
commit 610b899f66
12 changed files with 1049 additions and 636 deletions

View File

@@ -1,11 +1,28 @@
import { Model } from './index.js'
const model = new Model("Workbook1", "en", "UTC");
import { UserModel, Model } from './index.js'
model.setUserInput(0, 1, 1, "=1+1");
let t = model.getFormattedCellValue(0, 1, 1);
console.log('From native', t);
function testUserModel() {
const model = new UserModel("Workbook1", "en", "UTC");
let t2 = model.getCellStyle(0, 1, 1);
console.log('From native', t2);
model.setUserInput(0, 1, 1, "=1+1");
let t = model.getFormattedCellValue(0, 1, 1);
console.log('From native', t);
let t2 = model.getCellStyle(0, 1, 1);
console.log('From native', t2);
}
function testModel() {
const model = Model.fromXlsx("example.xlsx", "en", "UTC");
const style = model.getCellStyle(0, 1, 6);
console.log(style);
const quantum = model.getFormattedCellValue(0, 14, 4);
console.log(quantum);
}
testUserModel();
testModel();