This release mainly adds an example script to demonstrate how to generate content based on a template in a Word document, with the following associated changes:
- Improve the instruction MSWORD_FIND - restore the search range on return, make it an IF-like instructions, support limiting the maximum number of search results.
- Add two instructions VALUE_ARRAY and STRING_ARRAY for creating arrays.
- Add an instruction LIST which provides an alternative to the PHP list() language construct.
- Improve the instruction XML_FROM_CELL_ARRAY - support creating nodes from HTML string directly through html(). (The example script "script - XML_FROM_CELL_ARRAY" is updated to use the new feature.)
This release improves some instructions, and adds many new instructions to help building a new project site:
- Add the instruction CALL to PhpMyCellScript for running a sheet's instructions in another variable scope. (The example scripts "script - my_testX" and "script - test control flow" are updated to demo the use of the CALL instruction.)
- Add the instruction ARGV to PhpMyCellScript for getting the arguments passed by the CALL instruction more easily.
- Improve the RETURN instruction to support returning value.
- Make the instructions FOREACH and FIND behave both as a WHILE-like instruction and an IF-like instruction. (The example script "script - test control flow" is updated to demo the ELSE support of the FOREACH instruction.)
- Add two instructions ASSIGN_VALUE and ASSIGN_TEXT to PhpMyCellScript, which may be used in some situations where ASSIGN is not appropriate. (The example script "script - run local script" is updated to make use of ASSIGN_VALUE.)
- Add an instruction XML_FROM_CELL_ARRAY to PhpMyCellScript for creating XML nodes from cell array data, with an example script "script - XML_FROM_CELL_ARRAY" to show how to use it.
- Add an instruction ARRAY_MERGE_STRING to PhpMyCellScript. This instruction is similar to ARRAY_MERGE, but it will expand the variables in the cell values too.
- Add an instruction ECHO_CELL to PhpMyCellScript for quoted CSV field output.
- Add an instruction ESCAPE_STRING to PhpMyCellScript for escaping a string, which can be unescaped by parsing it as a heredoc string. (Two example scripts "script - gen dir template" and "script - prepare SELENIUM_DO" are updated to make use of ESCAPE_STRING. The example script "script - prepare SELENIUM_DO" will not escape \n now.)
- gen_json_from_excel() does not convert encoding, as strings read from Excel are in UTF-8 now.
This release contains the following enhancements:
- Change PhpMyCodeGenerator to read Excel cell value in UTF-8, so that it works the same no matter whether the input is in Excel format or in JSON format.
- The instructions MSWORD_XXX work on UTF-8 too.
- The instruction FOREACH to support IEnumVariant, so that MSWORD_TO_ARRAY is no longer needed.
- The arrays column_to_last_instruction_XXX_map are combined into one array, to centralize last instruction data management.
[Caution: scripts written for 1.x may not work on 2.x.]
This release mainly extracts the PhpMyCellScript (renamed from MyExcelScript) interpreter into a class and supports adding new PhpMyCellScript instructions through addons.
Other changes include:
- Rename gen_myescript() to gen_script().
- Remove the use of $_saved_value, which affects the instructions PHP, STRING, PROMPT, ECHO, MERGE, ASSIGN, CONCAT.
- Remove the instruction ITERATE, as FOREACH can be used instead.
- The first column is no longer regarded as a variable name, if it is not an instruction name.
- Change the versioning number scheme from X to X.Y.
- Rename and put ArrayToExcel classes to a namespace.
- Move some functions out from PhpMyCodeGenerator to simplify the class.
- Remove some useless PhpMyCodeGenerator and PhpMyCellScript examples.
This release fixes a bug that cell values are trimmed when a Google Spreadsheet is downloaded in JSON format. Installation scripts are updated to install newer versions of Zend Gdata and Selenium Server.
This release mainly adds preliminary support for non-Windows OS, updates the PhpMyCodeGenerator update script for the SourceForge project summary page change, and supports selecting a local or remote script to run through control panel.
This release supports loading spreadsheet data saved by the "myescript - spreadsheet to json" example script. This allows you prepare PhpMyCodeGenerator input through Google Spreadsheets, and removes the dependency on Excel.
This release just adds an example script to retrieve the content of a spreadsheet using the Google Spreadsheets API, and then save the content in JSON format. Later release may support reading spreadsheet content in that JSON format.
This release just adds an example script for downloading a spreadsheet from Google Docs.
This release mainly adds the instruction GDATA_GET to MyExcelScript for getting the response of a Google Data API directly.
This release adds the instruction GDATA_NEW_SERVICE to MyExcelScript for creating service objects to interact with Google Data APIs, with an example script for retrieving today's calendar events. An installer is provided to install the Google Data PHP Client Library through the control panel.
This release just adds an instruction PROMPT_PWD for getting a password from the user.
This release mainly adds a PhpMyCodeGenerator upgrade feature to the control panel. A new instruction HTML_LOAD is added to MyExcelScript to help parsing HTML too.
This release mainly adds a PhpMyCodeGenerator control panel, and associated scripts to help installing Selenium PHP client driver and AutoIt3.exe for use by some instructions in MyExcelScript.
This release adds two instructions SYSTEM and SHELL_EXEC to MyExcelScript, which makes it more convenient to execute external programs.
This release improves the performance of the MyExcelScript interpreter by caching the worksheet cell values.
This release adds three instructions BREAK, CONTINUE and ELSEIF to MyExcelScript to help to write more complicated logic.
This release adds an example script for transforming Selenium commands (in HTML) copied from Selenium IDE to SELENIUM_DO instructions.
The instruction SELENIUM_DO is improved to support specifying the encoding of the target string and the value string.
An instruction ICONV is added to support character set conversion.
This release adds an instruction AUTOIT to MyExcelScript to support executing AutoIt script, with an example to demonstrate how to get text from the clipboard.
This release adds some instructions (SELENIUM_*) to MyExcelScript, which integrate with the Selenium PHP client driver for scripting a browser. (You need to install the Selenium PHP client driver yourselves.)
This release adds two instructions GRAMMAR_COMPILE and GRAMMAR_PARSE to MyExcelScript to support defining grammars and parsing a string against a grammar.
This release just fixes the instruction FIND, so that it will not loop infinitely if an empty string is matched.
This release adds an instruction XML_FROM_VALUE to MyExcelScript, so that a value (like an array) can be converted to a SimpleXML object and XPath query can be run against the object.
This release also fixes the instruction MSWORD_FIND, so that it will not loop infinitely if there is a match at the end of the document.
This release adds two instructions XML_LOAD and XML_XPATH to MyExcelScript for working with XML documents, with an example script to show how to query a XML document using the instructions.
This release also updates the FOREACH instruction to accept Iterator too.
This release adds four instructions MSWORD_OPEN, MSWORD_NEW, MSWORD_TO_ARRAY, MSWORD_FIND to MyExcelScript, which intends to make it easier to script Microsoft Word in the spreadsheet.
An example script is added to show how to extract outline information and images from a document.