Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question around using 1-2-3 to view live data? #90

Closed
jibanes opened this issue Jun 14, 2022 · 7 comments
Closed

question around using 1-2-3 to view live data? #90

jibanes opened this issue Jun 14, 2022 · 7 comments

Comments

@jibanes
Copy link

jibanes commented Jun 14, 2022

Is it possible to "push" some data to a running 1-2-3 session from an external binary? And refresh 1-2-3 automatically (i.e. view live data)

@taviso
Copy link
Owner

taviso commented Jun 14, 2022

That's an interesting question. Normally you would manually pull fresh data with a macro and bind it to Alt+R or something - but I can see why you might want to push it instead.

I think the answer is no, but I think we could add this.

You can call a macro anything you want, but if you use the special names \A - \Z they get bound to keys.

If you call it \1, we could bind it to SIGUSR2?

That way you can have an external script run kill -USR2 $(pidof 123) or whatever, and your update macro is run the next time you're in READY mode. I think (famous last words...) this would be easy to add.

@jibanes
Copy link
Author

jibanes commented Jun 14, 2022 via email

@taviso taviso closed this as completed in 9b15360 Jun 15, 2022
@taviso
Copy link
Owner

taviso commented Jun 15, 2022

I think this works now!

Create a macro that updates the data, then name it \1 (use /Range Name Create)

For example, maybe you're importing data with /File Import, so your macro would look like {GOTO}A5~/fin{CE}/path/to/input.txt~)

Now do kill -USR2 $(pidof 123) in your script, and 1-2-3 will execute that macro the next time it is in READY mode!

@jibanes
Copy link
Author

jibanes commented Jun 15, 2022 via email

@jibanes
Copy link
Author

jibanes commented Jun 15, 2022 via email

@taviso
Copy link
Owner

taviso commented Jun 15, 2022

Hmm - I guess the 1-2-3 way to do this would be to use a lookup table!

If you generate your data like this (this is just some nonsense example data):

$ cat data.csv 
"Name","Value","Variance"
"Temperature",42000,0.96
"Density",36123,0.45
"Viscosity",99145,0.12

Now import that data with /File Import Numbers, and your dashboard can find the "Temperature" value with @VLOOKUP("Temperature",A1..C4,1).

I would read the data into one sheet, then have the dashboard on another!

@jibanes
Copy link
Author

jibanes commented Jun 15, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants