zheeeng/export-from-json

Data is not formatted into excel cells

chong-rm opened this issue · 1 comments

Codesandbox repro: https://codesandbox.io/s/dry-dust-kniwj4?file=/src/App.js
This was done in React

 export default function App() {
  const exportJson = () => {
    exportFromJSON({
      data: [{ 'this': 'is not formatting in excel'}],
      extension: exportFromJSON.types.xls,
    });
  
  }
  return (
    <div className="App">
      <button onClick={exportJson}>Download excel</button>
    </div>
  );
}

image

Am I missing any step? I was expecting the key/values to be in the cells

i'm an idiot, it should be exportType not extension 🤣