Hi,
Simple question from a newbie: when writing a matrix to an excel file with xlexport, some rows are left missing. This can be seen from row indices that jump from e.g. i37 to i39 in consecutive rows.
Does this have something to do with xlexport's (missing) ability to export zeros?
Apologies if this is a worn topic - pointers at least appreciated.
XLexport skips rows?
Re: XLexport skips rows?
Hi
If you are a newbie, I would strongly suggest to use the gdxxrw tool instead of xlexport, as gdxxrw has many more features.
Although xlexport is a great tool, it is superseded by gdxxrw (xlexport was developed in 1999 and the actual version is from 2002).
Cheers
Renger
If you are a newbie, I would strongly suggest to use the gdxxrw tool instead of xlexport, as gdxxrw has many more features.
Although xlexport is a great tool, it is superseded by gdxxrw (xlexport was developed in 1999 and the actual version is from 2002).
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Re: XLexport skips rows?
I am trying to use a code made by someone else. I already verified that zero rows are omitted by xlexport (why on earth?)
best.
best.
Re: XLexport skips rows?
Even then you should replace xlexport.
But to answer your question, if a parameter has a value of zero, it is not exported. In order to have this zero exported, you should add EPS (The special value EPS is numerically equal to zero, so when used in the context of numerical comparisons, it behaves as zero).
In your code, you should write, for example:
If myparam becomes zero, xlexport will export it as EPS.
CHeers
Renger
But to answer your question, if a parameter has a value of zero, it is not exported. In order to have this zero exported, you should add EPS (The special value EPS is numerically equal to zero, so when used in the context of numerical comparisons, it behaves as zero).
In your code, you should write, for example:
Code: Select all
myparameter(i) = a(i) - b(i) + EPS;
If myparam becomes zero, xlexport will export it as EPS.
CHeers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist