Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: copy+pasting a formula that includes number in exponential format fails with the error "There is no AST with such key in the cache"

Aperta
#1,288 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Inizia riproducendo il malfunzionamento con la configurazione HyperFormula fornita, concentrandoti sui punti di ingresso hf.copy() e hf.paste() per la formula =1.25e+5. Confronta questo percorso con la copia delle prime tre colonne; il lavoro è completato quando la copia e l’incolla della formula esponenziale terminano senza l’errore della cache AST e preservano il valore previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug Impact: Medium
Description

Attempting to copy+paste a formula that includes exponential notation (e.g. "=1.25e+5") results in the error:
There is no AST with such key in the cache

code to reproduce:

import HyperFormula from 'hyperformula';

const hf = HyperFormula.buildEmpty({
  licenseKey: 'gpl-v3',
});

const sheetName = hf.addSheet('main');
const sheetId = hf.getSheetId(sheetName);

// Arrange data

const tableData = [['100000', '1.25e+5', '=100000', '=1.25e+5']];

hf.setCellContents(
  {
    row: 0,
    col: 0,
    sheet: sheetId,
  },
  tableData
);

// Act - copying the first three columns works fine:

hf.copy({
  start: { sheet: sheetId, col: 0, row: 0 },
  end: { sheet: sheetId, col: 2, row: 0 },
});
hf.paste({ sheet: sheetId, col: 0, row: 1 });

const row1Values = hf.getRangeValues({
  start: { sheet: sheetId, col: 0, row: 1 },
  end: { sheet: sheetId, col: 2, row: 1 },
});
console.log({ row1Values }); // as expected, values are: [100000, 125000, 100000]

// Act - copying the last column gives the error:

hf.copy({
  start: { sheet: sheetId, col: 3, row: 0 },
  end: { sheet: sheetId, col: 3, row: 0 },
});
hf.paste({ sheet: sheetId, col: 3, row: 1 }); // results in: Error: There is no AST with such key in the cache
Video or screenshots

No response

Demo

https://stackblitz.com/edit/js-1prf9j?file=index.js,index.html

HyperFormula version

2.5.0

Your framework

No response

Your environment

Chrome 114

Lingua principale
TypeScript
Stelle
2.8k
Fork
172
Merge medio
1g 19h
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di handsontable/hyperformula

Tutte le issue di handsontable/hyperformula

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.