theoephraim / node-google-spreadsheet

Google Sheets API wrapper for Javascript / Typescript
https://theoephraim.github.io/node-google-spreadsheet
The Unlicense
2.34k stars 390 forks source link

feat(worksheet): enable add data validation call #689

Closed uladkasach closed 6 months ago

uladkasach commented 7 months ago

closes https://github.com/theoephraim/node-google-spreadsheet/issues/566

example of using it to create a dropdown field in screenshot:

image

ollebergkvist commented 6 months ago

@theoephraim Can we get this merged in please? 🙏

caseybrookes commented 6 months ago

@theoephraim Hi Theo! Can this pr be merged please? 🙏

uladkasach commented 6 months ago

Just realized that originally this PR had unintentionally included a package-lock.json diff.

That's now been corrected, with the diffs now scoped purely to the intended setDataValidation feature

theoephraim commented 6 months ago

I'll take a look at this and get it merged in today! Apologies for the delay.

I've been hard at work on a new project - an open source dev tool for dealing with configuration - https://dmno.dev/ It's still in beta but please check it out and ⭐ the repo if you have a sec.

theoephraim commented 6 months ago

Ok folks - this has been merged after adding tests and cleaning things up a bit.

A notable change, the function signature was changed to match the rest of the library more closely. It is now await sheet.setDataValidation(range, rule)

See https://theoephraim.github.io/node-google-spreadsheet/#/classes/google-spreadsheet-worksheet?id=fn-setdatavalidation