1

Can you change which values are included and how they are formatted, when you download a report as a CSV file from Toggl?

I would like to get the duration of the different tasks in a format that numbers can understand as a duration value.

3

No, it is not possible to change it when downloading. However, you can load it in a spreadsheet or script and change the format of the duration.

0

I wrote this Python script that fixes the toggl.com CSV for my purposes, it may be a useful starting point for your needs:

#!/usr/bin/env python
import csv
import sys
import operator

r = csv.reader(sys.stdin)
rows=[]
for row in r:
        row[5] = "'%s" % row[5]
        row[6] = "'%s" % row[6]
        row[7] = "'%s" % row[7]
        rows.append(row)

rows = [rows[0]] + sorted(
       rows[1:],
       key=operator.itemgetter(5)
)

w = csv.writer(sys.stdout)
for row in rows:
        w.writerow(row)

The script may be useful for Excel users too, I have not checked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.