question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing FormControl Button

See original GitHub issue

I have an .xlsm file that contains a macro tied to a button.

If I run the following:

const xlsx = require('xlsx');

const workbook = xlsx.readFile('./test.xlsm', { bookVBA: true });
xlsx.writeFile(workbook, './test_saved.xlsm');

and open test_saved.xlsm, the button is missing. The macro is still available but the button is gone.

Some simple steps to reproduce (in Office 2019)

  1. Create a blank workbook
  2. Add a button via Developer tab -> Insert. Click the button icon under Form Controls
  3. Record whatever macro you want when you add the button
  4. Save file as test.xlsm
  5. Run the code above
  6. Open test_saved.xlsm

I’d upload my test.xlsm if I could.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SheetJSDevcommented, Dec 31, 2020

email the file to dev@sheetjs.com

0reactions
SheetJSDevcommented, Aug 5, 2021

There are two types of controls in Excel:

  • “ActiveX controls” are stored in the VBA blob and can be round-tripped by setting the bookVBA option on read and write

  • “Form controls” are stored elsewhere and are currently supported in our Pro builds but not in the open source

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing controls using Angular2 Reactive Forms
Already have MdButtonModule imported. It turns out <button> with md-raised-button or class="md-raised-button" generates a button, but without ...
Read more >
Form Control Missing "More controls"! - English - Ask LibreOffice
Looking under Form Control and just found out MORE button is missing. I am not sure how to get it back. I have...
Read more >
Solved: OnSuccess Missing From Button/Icon Dropdown
OnSuccess – How an app responds when a data operation has been successful. This property applies only to the Edit form control.
Read more >
FormGroup - Angular
A FormGroup aggregates the values of each child FormControl into one object, with each control name as the key. It calculates its status...
Read more >
Exploring the difference between disabling a form control ...
Below is a simple form with two fields and a button. We will use this setup to illustrate the different ways to disable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found