opencobra / cobratoolbox

The COnstraint-Based Reconstruction and Analysis Toolbox. Documentation:
https://opencobra.github.io/cobratoolbox
Other
252 stars 317 forks source link

Problems converting models to .xls format with writeCbModel #775

Closed iaemparanza closed 7 years ago

iaemparanza commented 7 years ago

Typing the following line outputs an error: writeCbModel(model, 'xls').

The first part of the problem may be the following: in the writeCbModel() function, when defining the .xls extension, both .xls and .xlsx extensions are allowed. If none of them is written by the user in the dialog box, no extension is defined.

Moreover, we have found a second error: inside writeCbModel(), outmodel = model2xls(model, fileName, input.compSymbols, input.compNames) is called. The problem is that, in the way model2xls() is built, it does not permit an output variable.

I have made no changes in the functions because, as they are quite generalistic, they may be called by other functions in the toolbox and if I correct them, they may output errors in other tutorials.

I have used cobratoolbox version of July 14, 2017 in linux.

I hereby confirm that I have:

(Note: You may replace [] with [X] to check the box)

laurentheirendt commented 7 years ago

Fix provided in PR #801 . Thanks @iaemparanza for reporting.