hyperFormula getSheetValues converting date string to number

Tags: #<Tag:0x00007f8b1d29a7c0> #<Tag:0x00007f8b1d29a680>

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’));

Hi @jamshaidbutt055

As this issue is strictly related to HyperFormula and not Handsontable I would suggest to report it on HyperFormula’s issue board where our dedicated developer will help you:

1 Like

Thank you.
for other if they end up here searching the same.

https://github.com/handsontable/hyperformula/discussions/1141

Hi @jamshaidbutt055

Thank you. I will close this topic then.