Hello, good afternoon.
I have an error with the formulas, if in a cell of the handsOnTable I enter the formula =TODAY(), the formula returns the value of the previous day, how can I solve this type of problem?
thank you so much
import { HyperFormula } from ‘hyperformula’;
import ReactDOM from ‘react-dom’;
import { HotTable } from ‘@handsontable/react’;
import { registerAllModules } from ‘handsontable/registry’;
import ‘handsontable/dist/handsontable.full.min.css’;
// Inicialización de HyperFormula
const hyperformulaInstance = HyperFormula.buildEmpty({
licenseKey: ‘internal-use-in-handsontable’, // Verifica que la clave de licencia sea correcta
});
// Registrar todos los módulos de Handsontable
registerAllModules();
const ExampleComponent = () => {
const data1 = [
[‘prueba fecha’, 60, “2024/12/12”, ‘=(SUM(B1+C1))’],
];
return (
<HotTable
data={data1}
columns={[
{ type: ‘text’ },
{ type: ‘numeric’ }, // Cambiado a tipo ‘numeric’ para la columna de suma
{
type: ‘date’,
dateFormat: ‘YYYY/MM/DD’,
correctFormat: true,
defaultDate: ‘2000/01/01’,
},
{
type: ‘date’,
dateFormat: ‘YYYY/MM/DD’,
correctFormat: true,
defaultDate: ‘2000/01/01’,
}
]}
colWidths=‘140’
colHeaders={true}
rowHeaders={true}
height=“auto”
formulas={{
engine: hyperformulaInstance,
sheetName: ‘Sheet1’
}}
licenseKey=“non-commercial-and-evaluation”
/>
);
};
ReactDOM.render(, document.getElementById(‘example1’));