| |||||||||||||||||||||||||||||||||||||||||||||||
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
multiout6.mos (!******************************************************* Mosel Example Problems ====================== file multiout6.mos `````````````````` Output several data arrays into a single table. - Using 'initializations to' with the csv IO driver - (c) 2012 Fair Isaac Corporation author: S. Heipcke, Dec. 2012 *******************************************************!) model "Output multiple data columns (CSV)" uses "mmsheet" parameters CSTR= 'mmsheet.csv:multiout.csv' end-parameters 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 spreadsheet multiout.csv **** ! Options: ! skiph - the range includes a header line that needs to be skipped ! grow - only the starting line of the range is specified initializations to CSTR [COST,DUR] as 'skiph;grow;[F2:I2]' end-initializations end-model | |||||||||||||||||||||||||||||||||||||||||||||||
© Copyright 2024 Fair Isaac Corporation. |