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.

[BUG] Template data validation lost

See original GitHub issue

🐛 Bug Report

I have a template Excel file which includes data validations. When I use exceljs to write data to the template the data validations are lost.

Lib version: 3.8.2

Steps To Reproduce

// index.js
const Excel = require("exceljs");
(async () => {
  const workbook = new Excel.Workbook();
  await workbook.xlsx.readFile("./template.xlsx"); // Has data validation
  await workbook.xlsx.writeFile("./output.xlsx"); // Data validation lost
})();

See attached sample project: exceljs-bug.zip

The expected behaviour:

Data validation is retained.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
Siemienikcommented, May 26, 2020

So todo list:

  1. fix xlsx parser and renderer classes to be consistent with: [MS-XLSX]-120411.pdf
  2. typings to current existed Worksheet.dataValidations https://github.com/exceljs/exceljs/blob/master/index.d.ts#L955
  3. add dataValidation getter and setter for Column
  4. add dataValidation getter and setter for Row
  5. add posibility to set dataValidation by Range
  6. typings to all above
  7. update documentation
2reactions
florianLucascommented, May 13, 2020

Hi,

Any news about this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel Data Validation Tips and Troubleshooting - Contextures
This page has data validation tips, and shows how to fix Excel data validation problems, such as drop down not working, blank selected,...
Read more >
Excel - Data Validation Bug? - Microsoft Community
I seem to have established some unusual behaviour when using dynamic when creatign a dynamic data validation/drop-down list.
Read more >
Drop down list missing in Excel- which was your problem?
00:00 Drop down options not working00:20 The list has been deleted00:40 Drop down list shows all blanks01:13 Avoid drop down list being at ......
Read more >
DATA VALIDATION ANNOYANCES - Excel Annoyances [Book]
RESTRICT DATA ENTRY WITH VALIDATION RULES · CREATE A FORM TO EASE DATA ENTRY · BASE VALIDATION RULES ON FORMULA RESULTS · USE...
Read more >
Data validation in Excel: how to add, use and remove - Ablebits
In addition to the input message, you can show one of the following error alerts when invalid data is entered in a cell....
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