I am creating a number of tables with some table elements being strings and some table elements being numbers. For the elements that are strings I would like to use either Module or Package to limit the scope of the string names to this table in an input cell without duplicating the entire table list in the Module list. Is there an easy way to do this? Basically I want to be able to create a "scope wrapper" around a table and add entries as I would in a spreadsheet without the need for quotes around the strings. I also tried using the (undocumented) TableView which allows me to enter items in each cell without quotes - see example image below - but that intermittently crashes my notebook.
Here is an example for a table with all of the elements represented as strings:
myData = {{"Silicon Image", "address-1", "address-2", "address-3"},
{"a version", "value-1", "value-2", "value-3"},
{"another version", "value-4", "value-5", "value-6"}
} ;
Grid[myData, Alignment -> Center, Spacings -> {2, 1}, Frame -> All,
ItemStyle -> "Text", Background -> {{LightBlue, None}, {LightYellow, None}}]
How would I place this table in a Module allowing each element in the table (with quotes removed from the strings), to be a local symbol within the scope of this Module? This Doesn't work and I would rather not repeat each of the table element strings in the module variable list
Module[{{SiliconImage, address-1, address-2, address-3},
{a version, value-1, value-2, value-3}
{another version, value-4, value-5, value-6}},
myData = {{SiliconImage, address-1, address-2, address-3},
{a version, value-1, value-2, value-3}
{another version, value-4, value-5, value-6}
} ;
Grid[myData, Alignment -> Center, Spacings -> {2, 1}, Frame -> All,
ItemStyle -> "Text", Background -> {{LightBlue, None}, {LightYellow, None}}]
]
Module::lvsym: Local variable specification {{SiliconImage,address-1,address-2,address-3},{a version,value-1,value-2,value-3} {another version,value-4,value-5,value-6}} contains {SiliconImage,address-1,address-2,address-3}, which is not a symbol or an assignment to a symbol. >>