The oil data spreadsheet
Describes the data stored in Microsoft Excel spreadsheets.
The data for the oil sheet example is stored in the following sheets:
gas data
oil data
RESULT
If the sheet name contains a space, the name should be
surrounded by single quotes in the SheetRead instruction.
For example:
Oil from SheetRead(sheet,"'oil data'!B2:E4");
Provided that you have Microsoft Excel installed on your computer, you can view the contents of any of these sheets by simply double-clicking the Excel file in Windows Explorer.
You should view this file in the copy of the project you created when you opened the example using the New Example wizard. If you did not change any of the default settings in the New Example wizard, that should be in your default workspace, at the following location:
C:\Users\IBM_ADMIN\AppData\Roaming\IBM\ILOG\CPLEX_Studio<version>\workspace\oil
Microsoft Excel opens the spreadsheet and you can see
the first sheet and the tabs for all the sheets. Click a tab to see
its contents. Notice that the RESULT sheet
is initially empty.
The external data structure for the oil database example and the oil sheet example is the same.
oilSheet spreadsheet
The gas data
Click the sheet gas data if it is not visible when you open oilSheet.xls.
The five columns in gas data store the following values for each type
of gasoline manufactured:
name demand price octane lead
Each row is for one type of gasoline, with the product name of the gasoline stored as a character string in the first column. The daily customer demand for each type of gasoline is recorded and the price in this table is the sales price. The octane rating must be at least the value stored and the lead content must not exceed the value stored.
The oil data
The five columns in the sheet oil data store the following values for each type
of crude oil:
name capacity price octane lead
Each row is for one type of crude, with the name of the crude stored as a character string in the first column. The capacity figure represents the amount that can be purchased each day and the price is the purchase price. The other columns store the octane rating and the lead content.
The following graphic
shows the oil data spreadsheet as you see
it in Microsoft Excel.
