StackStorm-Exchange / stackstorm-excel

excel actions to read and write variables to an excel file
https://exchange.stackstorm.org/
Apache License 2.0
9 stars 8 forks source link

Add strict option to get_keys_for_rows #17

Closed amanda11 closed 4 years ago

amanda11 commented 4 years ago

Add strict option on get similar to strict on set. If sheet does not exist then current behaviour is to exception on get. Keep backwards compatible by default for strict being true Add option to set strict to false, and then [] will be returned for keys if sheet does not exist.

Unlike set didn't want to create the sheet on get, so kept the lock as not set on gets. Side affect was that exception raised in the generic get_sheet in this case, which is handled in the action. Would have required a bigger re-write of generic function to avoid the throw and catch of exception, and harder to maintain backwards support - so therefore kept to the catch of exception in the action. But could go for a large re-write if preferred to avoid this.