I have a hyperFormula
instance.
I am adding a sheet and setting its content to array of array.
when I getCalculated values hf.getAllSheetsValues()
. It is converting dates into timestamp i guess but dates are in string.
Below is demo, click on getValues
button and check data in console. dates are changing to number. Problem is I dont have handsontable instance to set cell type. I just have hyperformula instance.
https://jsfiddle.net/1uscqvL2/8/
import {useEffect} from βreactβ;
import HyperFormula from βhyperformulaβ;
registerAllModules();
const hf = HyperFormula.buildEmpty({
licenseKey: βinternal-use-in-handsontableβ,
})
const data = [
[
βidβ,
βParameterβ,
βGroupβ,
βTypeβ,
βUnitsβ,
β02-01-2021β,
β02-08-2021β,
β02-15-2021β,
β02-22-2021β,
β03-01-2021β,
β03-08-2021β,
β03-15-2021β,
β03-22-2021β,
β03-29-2021β,
β04-05-2021β,
β04-12-2021β,
β04-19-2021β,
β04-26-2021β,
β05-03-2021β,
β05-10-2021β,
β05-17-2021β,
β05-24-2021β,
β05-31-2021β,
β06-07-2021β,
β06-14-2021β,
β06-21-2021β,
β06-28-2021β,
β07-05-2021β,
β07-12-2021β,
β07-19-2021β,
β07-26-2021β,
β08-02-2021β,
β08-09-2021β,
β08-16-2021β,
β08-23-2021β,
β08-30-2021β,
β09-06-2021β,
β09-13-2021β,
β09-20-2021β,
β09-27-2021β,
β10-04-2021β,
β10-11-2021β,
β10-18-2021β,
β10-25-2021β,
β11-01-2021β
],
[
βVariable-75815β,
βVariableβ,
β-β,
βVariableβ,
ββ,
β1β,
null,
null,
β1β,
null,
β1β,
null,
null,
β1β,
β1β,
null,
β1β,
null,
null,
null,
β1β,
β11β,
null,
β1β,
β1β,
β1β,
β1β,
β1β,
β1β,
β1β
],
[
βFlow-94847β,
βFlowβ,
β-β,
βFlowβ,
ββ,
null,
β1β,
null,
null,
β1β,
null,
null,
β1β,
null,
β1β,
β1β,
β1β,
β1β,
β1β,
β1β,
β1β,
β1β,
null,
β1β,
β1β,
β1β,
β1β,
β1β,
null,
null,
β1β
],
[
βStock-99695β,
βStockβ,
β-β,
βStockβ,
ββ,
null,
null,
β1β,
β1β,
null,
β1β,
β1β,
β1β,
null,
null,
β1β,
null,
null,
null,
β1β,
β1β,
null,
null,
β1β,
null,
null,
null,
β1β,
β1β,
β1β,
β1β
]
];
export const ExampleComponent = () => {
useEffect(()=> {
let sheetName = hf.addSheet(βSheet1β);
let sheetId = hf.getSheetId(sheetName);
hf.setSheetContent(sheetId, data);
}, []);
const getValues=() => {
console.log(hf.getAllSheetsValues())
}
return working
};
ReactDOM.render(, document.getElementById(βexampleβ));