Great. I didn't know that you can end an entire script using the "return" command! I note there was no return type defined in the main function declaration yet the "return" method still works!! I use "break" to exit a loop as the nearest best thing. So, it looks like "return" is the replacement for "exit" in VBA.
@s65012r
3 жыл бұрын
Yeah, return basically exits the function. The 'return' from main will end the entire script -- but that's not the case if main calls another function - let's say foo() and the 'return' inside of it just ends the foo function. It won't end the entire Office Script or main function.
@yewchoob85
10 ай бұрын
Like your video and presentation style man, and it is a good introduction to some of the functionality of Office Scripts. I'm just a bit confused about the example, you've written a script that will only work if you're already on the active cell in a filtered column... if you're already on the active cell it's a lot quicker to click ctrl shift and L to clear all filters. Would be good to see you copy the filtered range from a table, only selecting a few columns. So for example, using your data set. You could write a script that drags out only the data relating to rows with the category "Components" but only copy the products and the sales columns to another sheet. Many thanks
@carlosm5591
3 жыл бұрын
Hello, very useful information. Is it possible to select a range and save it as another file? Using office scripts? Thanks
@aakashkarmakar4265
3 жыл бұрын
Hello, this video made a lot of stuffs clear. THANK YOU! I have a small query. Can you please suggest how we can copy a pivot table data to some other location. (Only paste values not the pivot table) The problem is that as the number of columns is dynamic and can vary every week, the normal record script is working in static sense. (Like it incorrectly left one column which was not there previously). Just curious to implement dynamic selections/operations.
Пікірлер: 5