Deterministic output of GridJsWorkbook#ExportToJson

The image artefacts produced by GridJsWorkbook#ExportToJson currently have arbitrary 18-digit names like 638179399601086160 taken from the system clock. That means one cannot ever be sure whether two independently generated GridJs spreadsheets are actually the same.

Is there a way to make sure that the output of GridJs conversion is deterministic, i.e. that GridJsWorkbook#ExportToJson produces the same output on the same input? It can still have random elements, as long as they are repeatable. (Like a random number generator returning the same random sequence given the same seed value)

Thanks!

@nikitar
QQ图片20230428142137.png (28.2 KB)
do you means the shape.tick ?
it is random generated by timeticket,and used later in client side js with UI side
you may just ignore such property .
most part of the properties are fixed.

if you want to compare two workbook ,you may use the serverside code by our cells API directly: workbook.Save(“wb.json”,SaveFormat.Json)
and then compare the json file

for GridJs

It can still have random elements, as long as they are repeatable. (Like a random number generator returning the same random sequence given the same seed value)

It seems not easy :thinking:.

That’s fair. This is not a blocker for us (as we can compare digests of pre-conversion files instead), I just wanted to see if there’s a simple workaround or a config setting. Thanks for the information!

@nikitar,

You are welcome. Please feel free to post your queries or issue, we will be happy to assist you soon.