[GH #10023] 'sheetName' does not exist in type 'DetailedSettings'

Tags: #<Tag:0x00007efc622a1948> #<Tag:0x00007efc622a17e0>

Getting this error when I use sheetName in formulas along with engine : HyperFormula from official documentation.

‘sheetName’ does not exist in type ‘DetailedSettings’

This is how I am setting <HotTable /> component.

<HotTable
    ...
    data={data[key as keyof typeof data]}
    formulas={{
          engine: hyperformulaInstance,
          sheetName: "MySheet",
    }}
    ...
    licenseKey="non-commercial-and-evaluation" // for non-commercial use only
    />

formulas is expecting DetailedSettings which does not contain sheetName.

@aleksandra_budnik @adrian.szymanski any help?

Hi @jamshaidbutt055

Sorry for late response. I checked your issue here: https://jsfiddle.net/aszymanski/ymbrgdwt/ and locally and it works fine. Can you tell which version of React you use?

@adrian.szymanski Yes on JSFiddle its working… but on codesandbox and locally on VS code, its giving the error I have posted above… https://codesandbox.io/s/cocky-gauss-q72gz6?file=/src/hottable.tsx

Codesandbox and local both installs the module and Fiddle uses CDN… the only difference I now of.
I have tried both V12.1.3 as well as V11.1 with React V18. I dont know why its altering the behavior on different Environments.

Hi, I checked again on a local project with React and TypeScript and it’s present only with this configuration. The problem probably lies within our React wrapper so it has to be fixed by our developers. I have reported the issue here and I will update you when we start working on it.

PS. I will close the tickets you opened on our other channels, let’s keep conversation in one channel.

A dirty Hack is to cast type as any

   formulas={
                {
                  engine: hyperformulaInstance,
                  sheetName: "Sheet1",
                } as any
              }

I’m glad you were able to find a workaround for this. I hope that it will be solved internally soon as well.