11-12-2009 10:22 AM
I'm editing a text file using "File I/O" functions and I'm trying to delete a complete row in the file. I tried to write backspaces (\b) over each character in the row but instead to delete them it appears squares. Does somebody know a better approach to delete text in a text file?
I'm using LV8.6.
I appreciate your help.
Hecuba.
11-12-2009 11:37 AM
11-12-2009 11:47 AM
A slight variant to elset's approach:
Use Read from Spreasheet file and place it into a 1D string array. Use the \r ( carriage return) or \n (new line) delimiter which will place each line into array elements.
If you know the line number, you can delete the matching array element (first line being zero 0).
If you do not know the line number you can use the search array function which will return the element index that you can use to delete the element.
Then use the Write to Spreadsheet file to restore the file, minus the line you wanted to remove.