Jump to content

Schedule Exporting Worksheet to Excel


Recommended Posts

I have multiple worksheets that I'd like to export to excel every week or so, but I was curious if there was a way to schedule them to be exported. I know I can schedule notifications to be sent out, but if I could get the Excel to export every Monday or something similar to that, it would be great.

Thanks,

Link to comment
Share on other sites

  • Seeq Team

There's not currently a native way to schedule exports of data via an emailed excel sheet or csv. We are able to schedule python notebooks to run on a schedule using spy.jobs.schedule, and send emails using spy.notifications.send_email, but currently attachments are limited to PDF files. I've linked this post to the feature request in our system to enable attachments of types other than PDF.

Here's an example of using spy.jobs.schedule and spy.notifications.send_email, but be aware that we only support attachment types of application/pdf currently.

from seeq import spy

attachment = spy.notifications.EmailAttachment(
    content=attachment_string, # must be b64 encoded
    type='application/pdf',
    filename=file_name
)

# send the email
spy.notifications.send_email(
    to='fake@email.com',
    subject='This is the subject of the email',
    content='This is the body of the email',
    attachments = attachment
)

# schedule the notebook to send every Monday
spy.jobs.schedule('Every Monday')

 

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...