News for hackers. Stuff that matters.
Re:Excel Functions in F# Language by lsm07 on Tuesday February 14, 2023 @11:05AM (#34791326)
I'm always happy to see F# get a mention, but using it inside Excel seems funny when you could just use it against a raw CSV file or whatever for data analysis/data manipulation.
Re:Excel Functions in F# Language by Idiot_in_Vain on Tuesday February 14, 2023 @11:25AM (#34791682)
Excel is a lot more user friendly interface for data analysis/manipulation, than a raw CSV file.
Re:Excel Functions in F# Language by coldacid on Tuesday February 14, 2023 @11:19AM (#34791580)
It's not for people like us who even know what a CSV is, it's for people who have some scripting/programming knowledge, but mainly live in Excel all day.
Re:Excel Functions in F# Language by nerdponx on Tuesday February 14, 2023 @11:55AM (#34792185)
Plenty of people who do know what a CSV is still sometimes (or frequently) use Excel, either for their own work or as a sort of "data app" that they can distribute to coworkers.
Re:Excel Functions in F# Language by JaggerJo on Tuesday February 14, 2023 @11:22AM (#34791635)
nice!
Re:Excel Functions in F# Language by bsdooby on Tuesday February 14, 2023 @11:24AM (#34791674)
An interesting F# blog that was found for me: https://www.planetgeek.ch/
Re:Excel Functions in F# Language by airstrike on Tuesday February 14, 2023 @09:42PM (#34799353)
Awesome find, thank you!
Re:Excel Functions in F# Language by Nelkins on Tuesday February 14, 2023 @11:54AM (#34792167)
Nice use of F# scripting. The #r directive for Nuget packages was a great addition.
Re:Excel Functions in F# Language by DoctorOW on Tuesday February 14, 2023 @12:44PM (#34792993)
I've done some VBA for work. If I build an Excel file with SharpCells and send them to someone who doesn't have it. What happens when they open it? From what I understand, .NET is pretty easy to decompile. Is it possible to make a SharpCells F# to VBA translation before saving?
Re:Excel Functions in F# Language by layer8 on Tuesday February 14, 2023 @01:06PM (#34793343)
VBA is the old win32/COM-based Visual Basic, not .NET, so that might be difficult.

I agree that the non-portability of such Excel extensions is a showstopper for many use cases.

Re:Excel Functions in F# Language by joenathanone on Tuesday February 14, 2023 @10:08PM (#34799560)
Microsoft is currently doing about everything they can to kill VBA.
Re:Excel Functions in F# Language by layer8 on Tuesday February 14, 2023 @01:04PM (#34793309)
How do they implement the subscription plans when no internet connection is required?
Re:Excel Functions in F# Language by velcrovan on Tuesday February 14, 2023 @01:20PM (#34793574)
Call me when Excel “programs” don’t silently give corrupted output when a formula or critical input is accidentally clobbered by a keypress.
Re:Excel Functions in F# Language by cjohnson318 on Tuesday February 14, 2023 @01:31PM (#34793801)
Call me when Excel doesn't randomly insist that things are dates.
Re:Excel Functions in F# Language by libraryatnight on Tuesday February 14, 2023 @02:11PM (#34794383)
I recall opening a csv of user data in excel, and one particular user had a username of april0204 (can't recall the actual number but you get the idea). It took me a moment longer than I care to admit to realize what had happened as i stared at the random date in the middle of my username column
Re:Excel Functions in F# Language by cjohnson318 on Tuesday February 14, 2023 @02:24PM (#34794586)
A while ago I got some Excel CSV exports that I couldn't read as I normally do. I tried several formats that I knew were associated with Windows systems. I ended up looking at the raw bytes and I noticed that every other byte was something like 0x00, so I wrote a script to strip all of that out. Several weeks later I figured out that I had been looking at utf-16. Derp.
Re:Excel Functions in F# Language by inglor on Tuesday February 14, 2023 @01:21PM (#34793602)
I work on Excel and this is really cool and I’ll share it with the rest of the engineers.
Re:Excel Functions in F# Language by inglor on Tuesday February 14, 2023 @01:44PM (#34793995)
Re:Excel Functions in F# Language by ripley12 on Tuesday February 14, 2023 @08:38PM (#34798942)
I mean... sorta. It's not easy to write a Office add-in just using the C API, and when I tried a year or two ago the only example code I could find was like 20 years old and all documentation was heavily pushing people toward the newer JS-based add-ins.

I quit that job because the extensibility story for Excel was so painful (but they had good business reasons for being in the space), sigh.

Re:Excel Functions in F# Language by airstrike on Tuesday February 14, 2023 @09:40PM (#34799340)
Writing an XLL add-in is a terrible pain I wish on no one at all. The documentation is all over the place, terribly outdated and generally an aggravating process to try to learn it from scratch
Re:Excel Functions in F# Language by rwhaling on Tuesday February 14, 2023 @01:49PM (#34794075)
Really cool - the stuff they are doing with the Excel API to inspect editing modes is super interesting: https://www.sharpcells.com/docs/blog/monitoring-edit-mode

I work with data warehouses, but I'm really jealous of the way our Finance team uses some abysmal plugin to directly query our GL from inside Excel - building something like that the can make the contents of a modern data warehouse available to Excel users has always been a holy grail for me.

My hunch is that exposing free-form SQL in Excel doesn't work, but something more like structured metrics (something roughly like dbt metrics) could potentially work? And tooling like this is probably what I'd want to prototype with.

Re:Excel Functions in F# Language by listenallyall on Tuesday February 14, 2023 @04:01PM (#34795926)
Can't be that abysmal if you're jealous of it and is similar to your idea of a holy grail. Is it Jedox perhaps?
Re:Excel Functions in F# Language by matt3D on Tuesday February 14, 2023 @04:22PM (#34796203)
I think PowerQuery largely solves this problem
Re:Excel Functions in F# Language by inglor on Tuesday February 14, 2023 @05:09PM (#34796874)
You can both feed SQL data sources into Excel and expose Excel as an ODBC data source (natively, usable today and used by a lot of companies!)
Re:Excel Functions in F# Language by giaour on Tuesday February 14, 2023 @01:51PM (#34794096)
Why is this a subscription?
Re:Excel Functions in F# Language by andix on Tuesday February 14, 2023 @02:13PM (#34794415)
Because the author wants to generate a continuous stream of revenue?
Re:Excel Functions in F# Language by jbjbjbjb on Tuesday February 14, 2023 @05:22PM (#34797040)
There are plenty of alternatives if you want something less commercial. ExcelDna is a great choice.
Re:Excel Functions in F# Language by andix on Tuesday February 14, 2023 @02:11PM (#34794388)
Interesting that it is F# only, usually .NET based products can also use C# and VB.NET. Especially VB.NET could be useful when porting VBA code.
Re:Excel Functions in F# Language by orthoxerox on Tuesday February 14, 2023 @02:52PM (#34794973)
Ah, at first I thought that was a library that implemented Excel functions in F#.
Re:Excel Functions in F# Language by eggy on Tuesday February 14, 2023 @02:58PM (#34795060)
Glad to see F# vs. C#. I prefer F# and it doesn't get as much play as C#.

But, being more of a Lisper, I've already subscribed to Acceλerate for Microsoft 365[1]. It's basically a full scheme available in Excel with VSA (Visual Scheme for Applications - nice play on VBA to dupe the unaware ;) ). It has a full REPL and an editor and also creates UDFs. It is Excel's new Lambda on steroids.

I'll have to try Sharp Cells. I've played with J[2] and some Excel tie-in scripts, but it is not integrated as nicely as Sharp Cells or Acceλerate.

[1] https://apexdatasolutions.com/home

[2] https://code.jsoftware.com/wiki/Scripts/OLEExcel

Re:Excel Functions in F# Language by japanman425 on Tuesday February 14, 2023 @09:01PM (#34799104)
Have you ever used F# in production?
Re:Excel Functions in F# Language by eggy on Wednesday February 15, 2023 @11:37AM (#34806321)
Not in the sense you probably mean, but I have performed three or four analyses when I worked at an engineering firm (entertainment - structural, mechanical) in F#. One involved an FSI system (Fluid-Solid Interaction using Project Chronos in C++) that I used F# for the mathy parts before the simulation. I also used F# to munge failure data and perform a Weibul analysis and generate a report for ride equipment. I have not used F# at all for web stuff. I typically reach for Mathematica (tried Julia, love it, but Mathematica's all-in-one notebook with curated data is hard to beat when you are doing something ecelctic and don't want to lose the flow of trying to pull in a data source or search for a library). I wish F# had more presence in the scientific community. It's very simple compared with Haskell, less verbose than C#, and it has the entire .Net ecosystem to draw on.
Re:Excel Functions in F# Language by xupybd on Tuesday February 14, 2023 @06:46PM (#34797918)
We use F# and Excel as our main tools. This seems like a product made in heaven.

But this would never fly for us. The pricing model could not be sold to management.

What would work is if it was something like $5k for a year of updates. We're on 365 so office's constant updates would force us to upgrade every year. But management would not feel like they're renting something they would rather own.

Re:Excel Functions in F# Language by japanman425 on Tuesday February 14, 2023 @09:02PM (#34799111)
What industry are you in? I’ve never found a need for it (probably quite rightly just writing crud apps…)
Re:Excel Functions in F# Language by xupybd on Tuesday February 14, 2023 @10:49PM (#34799875)
I'm in B2B manufacturing. We are abusing Excel no one should use it for what we do.

We have a spreadsheet that takes information from online orders into input cells. Then it has lines that if they calculate a qty of 1 or greater get consumed by CAM software. The product then gets sent to the appropriate machining center. Not a single line of VB. There are a few things that I could extract into custom formulas that would remove pages and pages of Excel formulas. However the entire point of the Excel setup is so that product experts not programmers can edit them.

We currently have F# in our internal tools. We have a couple of CRUD apps on the SAFE stack. A few ETL tasks in F#. The bug count seems to be much lower when using F#.

There is some legacy stuff in PHP, JAVA and C#.

Then we have an online store in C# but that is just using an open source tool NopCommerce. I couldn't recommend that highly enough. It has been amazing compared to everything I've worked with in the past.

Re:Excel Functions in F# Language by pjacotg on Tuesday February 14, 2023 @11:46PM (#34800200)
I was expecting you to say finance where Excel is abused in a similar fashion!
Re:Excel Functions in F# Language by gigatexal on Tuesday February 14, 2023 @10:00PM (#34799491)
Contact them. For corporates I’m sure they could work something out.
Re:Excel Functions in F# Language by qwerty456127 on Wednesday February 15, 2023 @04:24AM (#34801676)
Very cool, but...

Limiting (let alone this severely) a number of functions a developer can introduce and locking them in having to pay recurrently just to overcome this limitation and keep their code working is insane. I believe this dooms the product to be extremely unpopular. This way people probably won't even invest time in giving it a try.

Real-Time Data Sources sound like a thing which can be a premium feature. Unlimited UDFs and Unlimited Commands don't.

Re:Excel Functions in F# Language by keithalewis on Wednesday February 15, 2023 @10:53AM (#34805467)
Why drag F# into this? =LAMBDA(name, "Hello, "&name) works just fine. Modern Excel has MAP, REDUCE, SCAN, MAKEARRAY, etc.