matteoluigi Posted February 21, 2022 Share Posted February 21, 2022 Just a quick idea, afaik both functions only exist in worksheets and the 2022 Datamanager. Why not enable VLookup and XLookup functions also in Vectorscript/Python? Could be great... I already could have a use case for that... 1 Quote Link to comment
JBenghiat Posted February 21, 2022 Share Posted February 21, 2022 Do you want a lookup analog for scripting? You can basically do this with ForEachObject. Or are you wanting to look at a worksheet and get the result of a worksheet function in a script, without having to set the function as a cell in the worksheet, and then retrieve its data? Quote Link to comment
matteoluigi Posted February 21, 2022 Author Share Posted February 21, 2022 Yes, it’s option 2 which I want to achieve. i want to scan space objects for their type to assign them longer text parts which I “store” in another worksheet. one project I have is for example a list of all rooms with one worksheet for every room which of course grows with the building. I already have an idea. Setting a string like vs.SetWSCellFormulaN(worksheet, 2, 3, 2, 3,’=xlookup(A3,…)’ in a worksheet sounds promising (and a little bit naive, too ;-)) i will have a try asap. Quote Link to comment
matteoluigi Posted February 22, 2022 Author Share Posted February 22, 2022 It works 😄 why shouldn't it work, wrapping worksheet-code in a string which is written via python into a worksheet, why shouldn't it work. vs.SetWSCellFormulaN(worksheet,3,3,3,3,"=XLOOKUP(B3; '___'; 'Zimmeranzahl':A1..A11; 'Zimmeranzahl':B1..B11)") -> (XTABELLENSUCHE is the german translation for XLookup. I will never understand entirely why programming functions are translated into german 😉 ) 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.