feature request: autodata from spreadsheet

Almost all my important things get tracked in a spreadsheet. Libreoffice (and Microsoft Excel) is flexible enough to build a formula that takes the behavior and spits out a number ready for a do-more goal. So far, I’ve been typing that into Beeminder manually. What I would really like is some VBA code that pushes that number into a do-more goal whenever I save the spreadsheet.

The upside is mostly the flexibility to tinker with the “right” metric. Privacy nerds will love that the raw data stays on the local computer. Finally, the corporate world runs on Excel.

Beeminder developers, what would it take for you to implement this?

2 Likes

Please, no VBA, omg, no. Years of my life have wasted away because of that language (OK more like months).
Why don’t you write some VBA code that sends your spreadsheet data to the Beeminder servers via the API? :wink:
In all seriousness: I’d rather use a library such as JExcel (The Java library) to read .xls and one to read .numbers and one to read openoffice and one to read gnome office or whatever it’s called and all the other office packages and really it’s a mess.
Then the data would need to be structured in a very certain way or it would require the ability to customise the layout which sounds like “fun”.

Could you do it in Google Sheets?

re: adamwolf / Could you do it in Google Sheets?

No, that defeats the point. Both in terms of usability and privacy. Usability, because “no internet” is a great commitment device.

re: phi / VBA horrors
I’d be happy with a ready-made spreadsheet that has a separate Beeminder sheet and autouploads cell A1 to goal A2 whenever it gets saved. I’d rather not install a whole devops toolchain onto an end user desktop. Besides, if you go that route, it will likely be Windows only and leave me out.

edit: clarify usability

I have some code that reads Beeminder for Google Sheets already, but it sounds like it won’t be useful for you.

I think Google Sheets is at least as usable as Libreoffice, but to each their own, I gues.

1 Like

I second the recommendation to use the API.

I’m sure you can make HTTP POST requests with VBA (a quick google search gives me this.) You can use that to make requests to the Beeminder API, whose docs can be found here. (Specifically, this is how you send a new datapoint.)

You could use Powershell to read an Excel cell value, and then POST it up to beeminder via the API? Probably less than a dozen lines or so of PS script…

Powershell is a great tool in general. In my case, I’m on Linux, and Powershell isn’t available.

if we’re talking powershell and linux, then why not use an actual language and read that spreadsheet file and upload your data to the beeminder api?
I guess that’s not what you wanted to hear but that’s what I would do.

If you’re on Linux, then you have xls2csv as a command line (shell) tool, which you could use with a suitable bunch of shell script parsing to extract your datapoints, and then a curl command to upload via the Beeminder api?

Hmm, maybe I will do that as a low-effort one-off thing. If there is a less brittle and more universal solution, I’d prefer that.

My vision is a spreadsheet template anyone can download. Into the extra Beeminder sheet, you key in your auth token and goal name, then you set cell A1 to compute your data point. Boom, done. It just works even if you’re offline, or move files around, or email the spreadsheet, or experiment with lots of new goals, whatever.