You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

2.7    Data to Excel

The main dimensions and a table of deck data will be written to an Excel file. In here the total deck area will be calculated and the result will be send back to Quaestor in the parameter “Total_deck_area”. First store the Excel file Example.xls in the current applications directory (either of the knowledge base, located in Kbs\_<KnowledgeBaseName>\Applic, or the general Applic directory in My Knowledge).

Create the following parameters in the Knowledge Browser:

Parameter name

Dimension

Reference

Data_to_excel$

[$]

Data written to Excel sheet

File_name_Excel$

[$]

Excel file name

Total_deck_area

[$]

Total deck area calculated by Excel

  • Include the following parameters in Entity “Data to Excel“: “Loa”, “Lpp”, “Boa”, “Dm”, “Data_to_excel$”, “Deck_data#”, “File_name_Excel$”, “Total_deck_area and “QEntityData”.

Create the following relations in Entity “Data to Excel”:

  • Loa = ENTITY#(xx).Loa ; In which “xx” is the QEntityID of Entity ”Main Dimensions
  • Lpp = ENTITY#(xx).Lpp ; In which “xx” is the QEntityID of Entity ”Main Dimensions
  • Boa = ENTITY#(xx).Boa ; In which “xx” is the QEntityID of Entity ”Main Dimensions
  • Dm = ENTITY#(xx).Dm ; In which “xx” is the QEntityID of Entity ”Main Dimensions
  • Deck_data# = ENTITY#(xx). Deck_data# ; In which “xx” is the QEntityID of Entity ”Decks
  • File_name_Excel$ = "Deck_data_" + STR$(TIME(0)) + ".xls"
  • Total_deck_area = Data_to_excel$.Total_deck_area
  • To show computed values during a dialogue write “@SHOW” behind “QEntityData”.

Parameter “Data_to_Excel$” contains the EXCEL#() function. Create the relation as shown in Figure 85. EXCEL#() function returns the result of an EXCEL spreadsheet calculation in TeLiTab format. See the wiki for a detailed description of EXCEL#() function. 

Figure 85: Data_to_excel$ parameter


Back to content | Back to Tutorials

 

  • No labels