3 ms·
A chance to use my favourite feature of excel, flash fill: Given: A B a1b2c3 123 2g34 34f5 4l5p6 1.23E+06 Selecting column B w
by CraigJPerry 4y ago
A chance to use my favourite feature of excel, flash fill:
Given:
A B
a1b2c3 123
2g34
34f5
4l5p6
1.23E+06
Selecting column B with the one example cell and hitting flash fill yields:
A B
a1b2c3 123
2g34 234
34f5 345
4l5p6 456
1.23E+06 12306
I'd still absolutely love to see the code behind this feature.
EDIT: i just noticed an error in the last row, should be 1230000 not 12306. Ahh well.
- bobbylarrybobby 4y agoIt looks something like: try { return parse_float(text) } catch ParseError { return eval(match(/\d+/g, text).matches.join("")) } Unrelated to the implementation: in what circumstances is flash fill useful?
- deleted 4y ago[deleted]
- jodrellblank 4y ago> "I'd still absolutely love to see the code behind this feature." Windows PowerShell has a cmdlet ConvertFrom-String which "supports automatically-generated, example-driven parsing based on the FlashExtract, research work by Microsoft Research."[1]. Then when they open-sourced Powershell, that was one of the cmdlets which did not come over and is no longer supported, so no way to see the source code there, sadly. (Video [2] shows that FlashFill and FlashExtract and Excel / PowerShell uses are related, and he says it generates many possible programs which fit the given examples, and uses 'machine learning based ranking techniques' to choose which one fits best). [1] https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertfrom-string?view=powershell-5.1 https://docs.microsoft.com/en-us/powershell/module/microsoft... [2] https://www.youtube.com/watch?v=w-k9WjRJvIY https://www.youtube.com/watch?v=w-k9WjRJvIY
- tadkar 4y agoI think this is the paper https://arxiv.org/abs/1204.6079 https://arxiv.org/abs/1204.6079
- drumhead 4y agoAh yes, Flash fill. It always falls at the last hurdle. Nice idea, never quite gets it right.
- hbossy 4y agoSwitch to R1C1 Notation. It makes a lot of Excel magic easier to understand.