Short answer: NO. JavaScript in a PDF document is apparently a proprietary extension to the specification, source, Wikipedia:
PDF 1.7, the sixth edition of the PDF specification that became ISO
32000-1, includes some proprietary technologies defined only by Adobe,
such as Adobe XML Forms Architecture (XFA) and JavaScript extension
for Acrobat, which are referenced by ISO 32000-1 as normative and
indispensable for the full implementation of the ISO 32000-1
specification. These proprietary technologies are not standardized and
their specification is published only on Adobe’s
website.[8][9][10][11][12] Many of them are also not supported by
popular third-party implementations of PDF.
On July 28, 2017, ISO 32000-2:2017 (PDF 2.0) was published.[13] ISO
32000-2 does not include any proprietary technologies as normative
references.[14]
What this means is that you need to use Adobe’s own software in order to produce a PDF form which acts like a spreadsheet.