ElPandaRojo1 Posted April 4, 2020 Posted April 4, 2020 I need to know how I can replace a specific cell in a CSV file Example: I have 10 data in my file Shoe Bed Table Chair Dinning room Television Washing machine Computer Stove Door I need to replace the table with a bucket. How I do this? Thanks for the help
Developers Jos Posted April 4, 2020 Developers Posted April 4, 2020 What have you tried and are having issues with? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
ElPandaRojo1 Posted April 4, 2020 Author Posted April 4, 2020 (edited) I have tried this code and it also tries StringRegExpReplace but it doesn't work #include <File.au3> Local $datos = FileOpen (@UserProfileDir&"\Desktop\ChatsActivos.csv");, $FO_APPEND) $informacionLeida = FileRead($datos) $filasArrary = StringSplit($informacionLeida,@CR,2) $NumberActive = StringSplit($filasArrary[$s],";",2) FileWrite($NumberActive[0][1],$vActual&";"&$gActual) FileClose($datos) Compartir.au3 Edited April 4, 2020 by Jos
Developers Jos Posted April 4, 2020 Developers Posted April 4, 2020 (edited) Just to get you started, something like this should be close: $Input = FileRead(@UserProfileDir&"\Desktop\ChatsActivos.csv") FileWrite(@UserProfileDir&"\Desktop\ChatsActivos-new.csv",StringRegExpReplace($Input,"table","bucket")) Change the Regex in case you need to refine the replace search. Edited April 4, 2020 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
ElPandaRojo1 Posted April 4, 2020 Author Posted April 4, 2020 Thank you very much, if it works for me, I appreciate it
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now