I have a spreadsheet for timetables.
There is a range in one column with names. That’s the source of validation data for the big range with days and hours that makes up the timetable.
I have a sub that iterates through the names and reads the coincidences between name, date, and hour, to put the result on a Writer file.
The file is duplicated every week, and the names are updated before editing the timetables if needed.
I noticed that some conditions would allow the users (not always me) to insert wrong data into the timetable bypassing the validation.
So, I’d like to know how can I force the Basic routine to re-create the validation and verify it before processing the data.
I’ve tried to use the sheet.TableValidation service, but can’t find how to use it properly.
TL:DR Let’s say I want to create an instruction to force validation on the range B3:Q66 using the data from A75:A100
I asked ChatGPT, but it asks me to CreateInstance “com.sun.star.sheet.TableValidations” on the object sheet, but sheet does not support CreateInstance.
I’d apppreciate any help.