Forum Discussion
FICO
5 years agoCommunity Manager
I am trying to write to Excel from mosel. I want this write to always append to the existing content in the excel workbook. I read that the 'grow' attribute would work this way. However, does not app
I am using the following mosel code: to write to a given excel workbook output file. The output is written, but it does not append correctly. Note, the output table being written can be sparse (empty...
FICO
5 years agoCommunity Manager
Writing to an Excel spreadsheet with any of the mmsheet spreadsheet drivers does not affect the definition of ranges within the spreadsheet. Via the 'grow' option you indicate that output can continue under the row that is specified as (start of) the output range without modifying the range definition itself.
This means that any follow-up output will start at the same position as the original output (hence overwriting any existing contents) - any changes to the output location need to be implemented programmatically, either on the Mosel level (keeping track of the number of lines written, eg. via a call to 'getsize' for the entity that is written and calculating the next output location correspondingly: the row-column notation for explicit range definitions lends itself best for this purpose) or within the Excel spreadsheet using some VBA code (in this case it is recommended to work with the I/O driver mmsheet.excel).
Alternatively, it is possible to use the ODBC interface of Excel (NB: this interface is not well supported by Excel, so we don't normally recommend its use) - when selecting the header line of a table as output location you can replace
initializations to "mmsheet.xlsx:grow;skiph;myfile.xlsx"
AnArray as "MyOutRange"
end-initializations
by
initializations to "mmodbc.odbc:myfile.xlsx"
AnArray as "MyOutRange"
end-initializations
after running the latter version the area referred to by the range 'MyOutRange' is updated to the full output area so that the next output using the same range name will get appended to it.
Related Content
Related Content
READING EXCEL WORKBOOK IN MOSEL
Could you please help me whether Mosel can read a workbook a) if it contains a formula in a column not loaded, b) in a column loaded, and c) if it contains a VBA (.xlsm file : workbook with macros).10 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread5Views0likes2CommentsJava Blaze 6.6, Error: 'Attribute' already exists with a different type definition.
Java Blaze 6.6, Error: 'Attribute' already exists with a different type definition. Hi, For one of our clients, we have to deploy a rule service project which was developed in .NET Blaze ver 6.5 in...3Views0likes1Commentxpress python module: has no attribute
I am trying to use xpress with python for the first time. I have installed Xpress 8.3 32 bit. I am trying to run the first example from A Practical Guide to the New Python Interface for FICO Xpress O...9 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread6Views0likes2Comments