reads excel template workout summary
This commit is contained in:
@@ -32,7 +32,7 @@ from rowingdata import (
|
||||
MysteryParser, BoatCoachOTWParser,QuiskeParser,
|
||||
painsledDesktopParser, speedcoachParser, ErgStickParser,
|
||||
SpeedCoach2Parser, FITParser, fitsummarydata,
|
||||
make_cumvalues,cumcpdata,
|
||||
make_cumvalues,cumcpdata,ExcelTemplate,
|
||||
summarydata, get_file_type,
|
||||
)
|
||||
|
||||
@@ -996,6 +996,11 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
||||
|
||||
def parsenonpainsled(fileformat,f2,summary):
|
||||
# handle RowPro:
|
||||
if (fileformat == 'xls'):
|
||||
row = ExcelTemplate(f2)
|
||||
hasrecognized = True
|
||||
|
||||
|
||||
if (fileformat == 'rp'):
|
||||
row = RowProParser(f2)
|
||||
hasrecognized = True
|
||||
|
||||
@@ -50,7 +50,7 @@ def validate_file_extension(value):
|
||||
ext = os.path.splitext(value.name)[1]
|
||||
valid_extensions = ['.tcx','.csv','.TCX',
|
||||
'.CSV','.fit','.FIT','.zip','.ZIP',
|
||||
'.gz','.GZ']
|
||||
'.gz','.GZ','.xls']
|
||||
if not ext in valid_extensions:
|
||||
raise ValidationError(u'File not supported!')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user