Message Boards Message Boards

Avoid issues with WolframScript and GenerateDocument?

When I create a CDF file using a report template that displays data in a text grid, it works fine when run within a notebook. However, when I create a wolfram-script file with similar commands, the output CDF file does not show the TextGrid.

The "myTest.nb" file included below runs correctly and uses reportTemplate.nb for generating a CDF document. However, when I use same commands in a script "myTest.wl", the resulting CDF does not show the TextGrid correctly.

The other issues is with this blog itself. The "Add a file to this post" button does not allow files with ".wls" extension to be added. These are Woflram-Script files. They need to be named .wl files in order to upload.

POSTED BY: Tarkeshwar Singh
2 Replies

Tarkeshwar,

To answer your question, I need one piece of information: On the machine that you use to run this code, do you have the "(free) Wolfram Engine" installed? When you type wolframscript in a command line window and then evaluate $InstallationDirectory what is the output from that command?

Thanks, Arnoud

POSTED BY: Arnoud Buzing

Hello Mr. Arnoud Buzing,

When I evaluate $InstallationDirectory from Wolframscript, I get "C:\Program Files\Wolfram Research\Wolfram Finance Platform\3.0"

I was told by Wolfram that WolframScript does not support TextGrid. It only supports Grid. However, if the grid is a bit more elaborate, with multiple columns and rows, it fails when invoked by the WolframScript.

This report template has a grid that is filled with random numbers. When you execute the code in myTest.wls by WolframScript, it will not show up correctly. The file reportFromNotebook.cdf is a CDF generated from a notebook. The same code, when executed via WolframScript results in reportFromScript.cdf. You can see that it is not correct.

POSTED BY: Tarkeshwar Singh
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