Jump to content

Spy.push() overwriting worksheet rather than inserting into it


Dan

Recommended Posts

When I use the spy.push() command to insert some capsules into a worksheet it overwrites the existing worksheet rather than just inserting into it. The capsules are made correctly but all other data in the worksheet disappears.

I've read through the docs and can't see anywhere where I need to specify to insert and not overwrite. Hoping someone could point me in the right direction.

spy.push(data=CapsuleData,
		metadata=pd.DataFrame([{
			'Name': 'Capsules Times',
			'Type': 'Condition',
			'Maximum Duration': '1d'
			}]), workbook='Practice', worksheet='Practice Worksheet')
  • Like 1
Link to comment
Share on other sites

  • Administrators

Dan,

Currently there is no option to append items using the spy.push command.  I recommend pushing to a new worksheet and then adding the items manually through the data tab in order to not overwrite your current work.

To push to a new worksheet you can set the worksheet parameter to None.  

spy.push(data=CapsuleData,
		metadata=pd.DataFrame([{
			'Name': 'Capsules Times',
			'Type': 'Condition',
			'Maximum Duration': '1d'
			}]), workbook='Practice', worksheet=None)

I will attach a copy of your post to the feature request.

Regards,
Teddy

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...