| |||||||||||||||||||||||||||||||||||||||||||||||
Spreadsheets and databases: working with multiple data tables and arrays Description A database table (or a spreadsheet range) may contain in its different fields (columns) the data for several Mosel arrays and inversely, a Mosel array may correspond to several data tables (ranges). We have here examples of various different cases:
Source Files By clicking on a file name, a preview is opened at the bottom of this page. Data Files
multiout3.mos (!******************************************************* Mosel Example Problems ====================== file multiout3.mos ````````````````` Output several data arrays into a single table. - Using 'initializations to' with excel IO driver - (c) 2008 Fair Isaac Corporation author: S. Heipcke, 2007, rev. Dec. 2012 *******************************************************!) model "Output multiple data columns (3)" uses "mmsheet" declarations PRODUCTS: set of string MACH: range COST: dynamic array(PRODUCTS,MACH) of real DUR: dynamic array(PRODUCTS,MACH) of integer end-declarations ! Read data initializations from "multiout.dat" COST DUR end-initializations ! **** Writing data to the Excel spreadsheets multicol.xls **** ! Options: ! skiph - the range 'CombData' includes a header line ! grow - only the starting line of the range is specified initializations to "mmsheet.excel:skiph;grow;multicol.xls" [COST,DUR] as 'CombData' end-initializations ! Alternative: specify the range/worksheet initializations to "mmsheet.excel:multicol.xls" [COST,DUR] as 'grow;[Sheet1$L4:O4]' end-initializations end-model | |||||||||||||||||||||||||||||||||||||||||||||||
© Copyright 2023 Fair Isaac Corporation. |