# Update column values on a csv file

**URL:** <https://forums.eggplantsoftware.com/t/update-column-values-on-a-csv-file/8052>\
**Category:** Uncategorized\
**Created:** [October 8, 2022, 2:08pm UTC](https://forums.eggplantsoftware.com/t/update-column-values-on-a-csv-file/8052 "2022-10-08T14:08:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yschakri16](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/y/ebca7d/32.png) [@yschakri16](https://forums.eggplantsoftware.com/u/yschakri16)\
**Post date:** [October 8, 2022, 2:08pm UTC](https://forums.eggplantsoftware.com/t/update-column-values-on-a-csv-file/8052/1 "2022-10-08T14:08:35Z")

</div>

Hi, I need to create a script, it has to read a value from column a1 and will do some math, and it has to update column b1 with the result. how to do this in CSV file. we don’t have access to Excel file in our SUT, so has to do this in CSV.

Col 1 Col2  
5  
4  
3

---

<div class="post-metadata">

**Author:** ![DaveHester](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/davehester/32/104_2.png) [@DaveHester](https://forums.eggplantsoftware.com/u/DaveHester)\
**Post date:** [October 10, 2022, 6:32pm UTC](https://forums.eggplantsoftware.com/t/update-column-values-on-a-csv-file/8052/2 "2022-10-10T18:32:18Z")

</div>

Database manipulation occurs on the developer machine (Agent) and not on the SUT, so feel free to use Excel-formatted files.  
You can find more on them here: [Working with Excel as a Database | EPF Docs](https://docs.eggplantsoftware.com/studio/stk-working-with-excel/)

---

<div class="post-metadata">

**Author:** ![GammaG](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@GammaG](https://forums.eggplantsoftware.com/u/GammaG)\
**Post date:** [October 11, 2022, 6:19am UTC](https://forums.eggplantsoftware.com/t/update-column-values-on-a-csv-file/8052/3 "2022-10-11T06:19:10Z")

</div>

Hi yschakri16,  
for working with plain text there are 2 useful functions in eggplant . CSVValue() and CSVFormat(). See [Data-Driven Testing with Eggplant Functional](https://docs.eggplantsoftware.com/ePF/using/epf-data-driven-testing.htm) and  
[File and Folder Interaction](https://docs.eggplantsoftware.com/ePF/SenseTalk/stk-file-folder-interaction.htm#csvvalue)  
Thus You may read Your file with  
put CSVValue(file “myFile.csv”)  
getting  
[{Col1:5,Col2:""},{Col1:4,Col2:""},{Col1:3,Col2:""}]  
BR
