12
$\begingroup$

This is NOT about importing/exporting Excel data to/from Mathematica.

This is purely a UI question.

The Mathematica notebook interface is very "linear" — I type in an input cell and Mathematica produces an output cell. Is it possible to implement something like an Excel interface for Mathematica?

For example, if I have:

  • cell a1 = "x+y"

  • cell b1 = "x-y"

  • cell c1 = "= a1^2 + b1^2"

Then, Mathematica puts "2(x^2+y^2)" into c1. If I modify a1 to say "3", Mathematica puts "(x-y)^2 + 9" into c1.

$\endgroup$
4
  • $\begingroup$ To whomever voted to close: how is this not a real question? $\endgroup$
    – Mr.Wizard
    Oct 14, 2012 at 23:35
  • 2
    $\begingroup$ I think this is a duplicate of this: mathematica.stackexchange.com/q/3868/5 $\endgroup$
    – rm -rf
    Oct 15, 2012 at 0:04
  • $\begingroup$ @rm-rf I don't know; that seems to be only about entering values, rather than more traditional spreadsheet interactions. I think this is an interesting extension. $\endgroup$
    – Mr.Wizard
    Oct 15, 2012 at 0:42
  • $\begingroup$ Wolfram talked about this on the 2009 or 2010 WTC. Since then, it has been on my wish list for M9 (but my list is very big...). It would definitely allow for a better first contact with Mathematica, since everybody knows the Excel interface; Excel on steroids, with symbolic computation inside cells! $\endgroup$
    – P. Fonseca
    Oct 15, 2012 at 7:49

1 Answer 1

8
$\begingroup$

Here's a very basic start:

a1 = x + y;
b1 = x - y;
{{InputField[Dynamic[a1]], InputField[Dynamic[b1]], 
   InputField[Dynamic[a1^2 + b1^2]]}} // TableView

Mathematica graphics

$\endgroup$
7
  • $\begingroup$ hmm; I really like how the "TableView" "InputField" and "Dynamic" just "composes together" in creating this. $\endgroup$
    – user4261
    Oct 14, 2012 at 23:14
  • 2
    $\begingroup$ @Mr.Wizard Correct me if I'm wrong, but isn't TableView something which isn't "officially" a part of Mathematica, in the sense that it's not documented and might very well change or be dropped completely in newer versions? $\endgroup$
    – jVincent
    Oct 14, 2012 at 23:16
  • $\begingroup$ @jVincent: what is the proposed replacement? $\endgroup$
    – user4261
    Oct 14, 2012 at 23:21
  • 2
    $\begingroup$ @user1647794 Well TableView isn't doing anything with respect to the functionality you asked for, so you could use Grid, instead, or remove one level of parenthesis and use Row or Column. $\endgroup$
    – jVincent
    Oct 14, 2012 at 23:23
  • $\begingroup$ @jVincent That is correct. It seemed appropriate to give it a spreadsheet feel. This answer is far from complete but I hope it inspires someone to post a better one. $\endgroup$
    – Mr.Wizard
    Oct 14, 2012 at 23:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.