Message Boards Message Boards

0
|
4628 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Importing the formulas from an Excel Workbook

array=Import[workbookname.xlsx];

Is there any way to also import the formulas which relate Excel cells to other cells other cells in the same Worksheet including cross references between Worksheets in the same Workbook or Worksheets in other Workbooks?

Thanks,

MIlt Benjamin Self 856 3547692 C

4 Replies

Hi Ian, I constructed another approach to managing busy code. I abstract the problem one level up and develop a sctipt to tell Mathematica what to do in much fewer lines.

This requires me to deal with very busy code just once. The busy code parses the script and constructs Wolfram Programming Language code which solves any problem which fits in the Framework of the Script.

Thanks Milt

Hi Milt, that’s good to know as I can anticipate situations where I’ll want to import formulae. As an aside, I generally structure my code such that functions and their arguments are entered on separate lines with function arguments given in alphabetical order. With embedding, I find this makes the code easier to degroggle and makes it easier to pick out items/options, especially for deeply nested functions and/or long lists of options. One issue I’ve found with my approach, however, is that code structured this way doesn’t seem to Iconize, which is disappointing. Another issue I’ve found with Iconizing is that the original code gets restructured if it is subsequently un-Iconized. Iconization is a good concept as it provides a means for the reader to focus on key concepts by effectively hiding code of secondary importance and if these issues could be addressed I’d use it much more extensively. Apologies for going off at a bit of a tangent. All the best, Ian

POSTED BY: Ian Williams

I believe there’s an optional argument “Formulas” that enables you to import a workbook’s formulae as text. I’ve never tried this, but it sounds like you may have to translate the text form of the imported formulae to WL expressions if you want to use them in your notebook. I’d be interested to know if you have any success with this.

POSTED BY: Ian Williams

Hi Ian, Found the problem! I left the s off "Formulas" as the 2nd argument to Import[]. After adding the "s", it works like a champ. I must remember to put each Wolfram Language Statement on its own line so its readable!.

Thanks, Milt

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract