6
$\begingroup$

Is there a methodology that would work well for replacing Excel with Mathematica?

Typically I use Excel to make various lists of values with formulae that relate those values. Below is a very typical example of a spreadsheet I might make showing radar range equations. I color input cells blue and computed cells are left black. It is very easy and simple to do:

enter image description here

Is there an equally easy approach to generating and organizing information like this in Mathematica?

UPDATE: I would like to re-open this question with the specific solution idea of using 2D Tables/Matrices. I did not realize this ability existed to create 2D input arrays using Mathematica.

Can I use 2D input arrays to simulate spreadsheet functionality?

$\endgroup$

closed as too broad by m_goldberg, MarcoB, user9660, ubpdqn, march Mar 4 '16 at 8:17

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Something like TableView[]? $\endgroup$ – garej Mar 3 '16 at 20:53
  • $\begingroup$ @garej That just produces output. You cannot edit the cells of a TableView directly as far as I know. $\endgroup$ – Tyler Durden Mar 3 '16 at 20:54
  • 7
    $\begingroup$ As the question specifically requests "equally easy approach", the answer is simply no. I would say, this is many orders of magnitude more complicated in mathematica. But I think that stems from the confusion of the purpose of each software. You probably would not like to use Mathematica instead of CorelDraw or Photoshop... $\endgroup$ – leosenko Mar 3 '16 at 20:58
  • 2
    $\begingroup$ Here is maybe a start? $\endgroup$ – Emy Mar 3 '16 at 22:14
  • 2
    $\begingroup$ Mathematica Link for Excel is an excellent product for getting the best from both worlds. Some bucks involved, though. $\endgroup$ – Dr. belisarius Mar 3 '16 at 23:25
6
$\begingroup$

To get empty sheet

tmp = TableView[]

Then enter some values and use Normal to derive the result as MMA list:

enter image description here

Result:

{{}, {Null, "Value1", "Value2"}, {"Normal", 3, 6}, {"Vector", 4, 7}}

Back to Table:

%//TableView

Of course, it is not recommended to emulate cell reference system of Excel in Mathematica.

$\endgroup$
  • $\begingroup$ Do not need to do that. Just want to have a table-like input form with things lined up in columns and editable so users can enter input values without having to edit code. $\endgroup$ – Tyler Durden Apr 9 '16 at 20:11
3
$\begingroup$
x = Table[0, {3}, {3}];
Grid[Table[ InputField[Dynamic[x[[#[[1]], #[[2]]]],
      Initialization -> (x[[Sequence @@ #]] := Null)]] &@{i, j},
  {i, 3}, {j, 3}]]
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.