# Code component: add data to excel file

**URL:** <https://discourse.psychopy.org/t/code-component-add-data-to-excel-file/32412>\
**Category:** Builder\
**Tags:** data\
**Created:** [December 12, 2022, 11:30am UTC](https://discourse.psychopy.org/t/code-component-add-data-to-excel-file/32412 "2022-12-12T11:30:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AFG](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@AFG](https://discourse.psychopy.org/u/AFG)\
**Post date:** [December 12, 2022, 11:30am UTC](https://discourse.psychopy.org/t/code-component-add-data-to-excel-file/32412/1 "2022-12-12T11:30:44Z")

</div>

Hi everybody!  
**OS** (e.g. Win10): Windows 10  
**PsychoPy version** (e.g. 1.84.x): 2022.2.4  
**Standard Standalone? (y/n)** If not then what?: Standalone  
**What are you trying to achieve?:** My experiment stores the initiation times when a participant starts reading a sentence, using the voicekey code component. To save the data of this initiation time, I’ve added the code ‘thisExp.addData(‘vocal\_RT’, round(vpvk.event\_onset,3))’ in the “End Routine” tab of my voicekey code component. This works well and stores data in a .csv file along all other info. To facilitate data processing, **I wish to record these data in an excel file**. To do so, I’ve ticked the “Save excel file” box in the experiment properties.

**What specifically went wrong when you tried that?:** Unfortunately, the data is not appearing in the excel file. Would you have any insights as to make it work?  
Thanks in advance!
