CSVDocument.Replace Method
| Explanation | Replace data in cells of specified column at once. By stating the condition, selected cell can be replaced. Added since Ver.4.1.0 Mobile Ver.3.0.0 | |
| Call format | var ret = csvdoc.Replace( row, col, val [, cond1 [, cond2, … ] ] ) | |
| Return value | Number of updated cell. | |
| Arguments | integer row | Column number starting with 0 on the column that starts the replacement. The rows after the row specified by row will be replaced. |
| integer col | Column number starts with 0 on the column that starts the replacement. | |
| String val | Character string to bet set. The string can be specified directly, or can specify the value in another column in the following format. Example:- In this example,the cell that matches the condition is replaced with the values in the 4th column of the same row. If the replacement string starts with "[", escape it with "\ [". Note that \ is an escape character in the CRS language, so if specify it as a string constant in a CRS script, \ must be specified twice. Example:- | |
| String cond | Search criteria for cells to replace Format is specified same as Load method. Can specify as many search conditions as desired,as long as the maximum same as the number of columns, and if specify more than one, combine them with AND. | |
| Exception | CSV-14 | Incorrect column index |
| Example of use | | |
| Related item | Load, Find methods | |