Code Monkey home page Code Monkey logo

Comments (2)

ron-b avatar ron-b commented on May 18, 2024

Hi Antoine,

Can you share a sample project with your issues?

from connected-workbooks.

anicolas-richard avatar anicolas-richard commented on May 18, 2024

Hello Ron,

Sure. I basically try to execute one of the README example, using Node (tried latest v20 & v21) :

import workbookManager from '@microsoft/connected-workbooks';
const grid = {
  config: { promoteHeaders:true, adjustColumnNames:true },
  data: [
      ["Product", "Price", "InStock", "Category", "Date"],
      ["Widget A", 19.99, true, "Electronics", "10/26/2024"],
      ["Gizmo B", 9.99, true, "Accessories", "10/26/2024"],
      ["Bubala", 14.99, false, "Accessories", "10/22/2023"],
      ["Thingamajig C", 50, false, "Tools", "5/12/2023"],
      ["Doohickey D", 50.01, true, "Home", "8/12/2023"]
  ]
};
const blob = workbookManager.generateTableWorkbookFromGrid(grid);    
workbookManager.downloadWorkbook(blob, "MyTable.xlsx");

I have several issues with some (maybe normal) workarounds :

  • I need to ass a comma in const grid, between the 2 properties
  • I have to save as a module (mjs extension) to use the 'import' declaration/syntax
  • Though, I still get an error stating 'generateTableWorkbookFromGrid is not a function', which I can't manage to fix.

Hopes this is more clear for you :)
I am very looking forward using such a solution to generate Excel files with specific Power Query already built in !

Best regards,
Antoine

from connected-workbooks.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.