{{indexmenu_n>1}} ===== OFFICE XONE ===== \\ ==== Description ==== \\ This document sets out the modifications that must be done in a Word-Excel document for the correct treatment of this by part of Office2XOne interface. \\ This interface takes Word **(.doc-.docx)** and Excel **(.xls-.xlsx)** documents and transforms them into XOne collections that may be used by the different XOne frames.\\ \\ ==== Configuration ==== \\ \\ The **Office2XOne** interface has a file called ** Office2XOneApp.exe.config** for its configuration, where just we must configure the following parameters: \\ |**PathDocs**| The path where the office files will be established.| |**PathOutXml**| The path where the interface will lodge the .xml resulting will be established.| |**PathMoveDocs**| The path where the interface will lodge the office files once converted into xml will be established. | |**FILE_PREFIX**| A prefix for each .xml will be established (being able to use macros of the type **##DATE##** or **##NOW##**)| |**Section connectionStrings**| The connection to the database is established. | |**Section checks**| The possible fields of check type are established (for instance, P, N, N/A, C, NC, YES, NO…) as we will see later on.| |**Log System**| The program has available a log system, so in case there is any problem the user may know to fix it. The log is saved in the same path where the exectable is installed, and it has this name: **Log+fechadeldia.txt**. | \\ \\ ==== Excell Document ==== \\ The Excell document waited for the **Office2XOne** interface is any Excel document that meets a series of parameters defined. \\ The system detects in the Excel documents as data entering field all the cells that are unlocked and as text field (either tab or a field title) every cell that is locked. \\ \\ The lock or unlock of each cell is established in the option //__**Cells format**__//, //**__Secure__**//, therefore, every Excel sheet must be blocked except for the data entering cells. \\ At the time to save the document, it must be done from the option //__**Format**__//, using the option //__**Secure sheet**__.// \\ \\ ==== Excell Tables Format ==== \\ The **Office2XOne** interface reviews the sheet by browsing rows by columns, so two different tables cannot be placed at the same height (one beside the other) since the system would combine them erroneously, that is, two tables cannot share the same rows. \\ The system can read the following types of tables:\\ \\ \\ {{ :wiki:office-xone:tabla.png?nolink&700 |}} \\ \\ Where there are what we call **field+value**, that is, data entry cells with a title that is the cell that precedes it. As we said before, only the data entry cells are unlocked.\\ \\ {{ :wiki:office-xone:tabla2.png?nolink&700 |}} \\ \\ Where the system detects the ** B, C, D and E ** column as a title tag and the ** F, G and H ** columns as data entry cells where its title is the first cell with text to above, that is, cell ** F67 ** considers it as a value field where its title is the content of ** F64 **. \\ In this case, also, these fields are established as checks, that we will see in the following sections. \\ Logically the system allows the combination of both tables, with fields + value and of type cells with superior header, provided that the rules previously commented are complied with. \\ ==== Word Documents==== \\ The Word document waited by the **Office2XOne** interface is all that Word that is devided into tables, since are these which ones are browsed through the whole document. \\ As in Word does not exist the possibility to detect the data entry fields through __**lock/unlock**__ the cells, it is established that every empty cell (without text) is considered field of data entry and every cell with text is treated as text label cell or title of the value field that follows. \\ As the system only read the tables, if we want to place a text or paragraph between two tables, just insert a table of an only cell between the two tables and enter the text or paragraph (being able to delete the borders so that it does not look like a table).\\ \\ \\ ==== Word Tables format==== \\ The tables formats accepted are the same ones than in Excel format, and they follow the same features.\\ The only difference is the treatment of some text cells, for instance:\\ \\ {{ :wiki:office-xone:tabla3.png?nolink&700 |}} \\ \\ In this example we can see three cells without text in the two first columns (under the cell with text **‘DI’** and to the right of the cell with text **‘2’**). \\ In Excel so that it is not taken into account as a data entry cell, just put the cell format blocked. En Word, in order it is not taken as such, we must at least enter in that cells an ‘space’ so that it doesn´t detect these cells as without text. .\\ \\ ===== USE OF MACROS ===== \\ ==== Cell Format ==== \\ \\ In **Excel** a data entry cell may have an specific cell format (date format, numeric...), this format is read by the **Office2XOne** interface and this datum is used to establish the type attribute of this prop in the resulting xml collection. \\ In **Word** is not possible to give format to the cells, so it is necessary the use of macros in the case we want to specify an specific format.\\ \\ |Installer|Review Date|##D##| |Number of license|##N##|Review Time|##TT##| \\ In this example, //**‘Nº License’**// is established as numeric format **(type=”N”)**, //**‘Review Date’**// as date format **(type=”D”)** and //**‘Review Time’**// in time format **(type=”TT”)**. Every cell having no macro, the format type by default that is used is text **(type=”T”)**.\\ \\ \\ ==== Check Format ==== \\ If it is configured the check section of the configuration file, whenever the preestablished heading appears in this configuration is considered that the field is check type, and it is check type where only one of these options is possible to point. \\ The configuration, a priori, would be for the headings:** P, N, N/A, C, NC, SI, NO, SD, L, G and M.**\\ If we want the checks are multi answer or using as check a cell where the heading do not correspond with the configurated ones, we have several options. \\ \\ \\ {{ :wiki:office-xone:tabla4.png?nolink&700 |poner imágen}} \\ \\ In this table we have three checks columns, where according its heading (if it is configured like that) they would be of the type "an only valid answer".\\ If we want they are multi answer, just put in the heading the macro **##M2##**.\\ \\ {{ :wiki:office-xone:tabla5.png?nolink&700 |}} \\ \\ **##M2##** serves to indicate that we can select more than one answer. \\ \\ | Verifications |Documental Verification ##M2## |Technical Review ##M2##|Inspection of the installation ##M2## | |Type of control | | | | \\ \\ In this case, we indicate that the three columns are checks, and multi answer is allowed. If we want only one answer possible, we would have to put the macro **##M1##** in the headings of these columns. \\ \\ |Verifications|Documental Verification ##M1## |Technical Review ##M1##|Inspection of the installation ##M1## | |Type of control | | | | \\ \\ The macros can be in the font color of the bottom of the cell, to simulate being transparent, and with a tiny font size, the system detects the text of each cell regardless of the font color it has and its size.\\ \\ The character  in Excel is get with the font ** Wingdings** (letter **o**).\\ Logically if in the previous table doesn´t appear the simbol  in the cells neither has in the heading the checks macros:\\ \\ |Verifications|Documental Verifications |Technical Review |Inspection of the installation | |Type of control | | | | \\ The system treates it as three columns of text entering, with a label **(type=”TL”)** previous with the text //**‘Type of Control’**// and three prop of type=”T” where its titles are, respectively, ‘Documental Review’, ‘Technical Review’ and ‘Inspection of the installation’. \\ \\ ==== Contents ==== \\ We understand as contents a table where we must enter an indeterminate series of rows.\\ \\ |Type Verification |Documental Review|Technical Review|Inspection of the installation.| | x | | | | \\ In order not to indicate to the system a fix number of rows and have to fill them or that they occupy space on the screen, we use the macro **##Z##** to indicate that is a contents. \\ The macro must be placed in the whole heading. \\ \\ |Verification Type ##Z##|Documental Reviewl##Z##|Technical Review##Z##|Inspection of the installation ##Z##| | x | | | | | x | | | | | x | | | | | x | | | | \\ This will create a contents with these four fields, being able the user to add as many lines as necessary. \\ \\ \\ ==== Multilines ==== \\ In some situations it is necessary to establish fields where the text to enter is bigger and requires several lines (field Notes or remarks). \\ For this we have the macro **##MULTILINE##**.\\ \\ ===In Word === \\ |Review date: | |Review time: | | |Remarks|##MULTILINE##| \\ \\ ===In Excel=== \\ {{ :wiki:office-xone:tabla6.png?nolink&700 |}} \\ \\ In Excel the macro must go in the title of that field. \\ \\ \\ ==== Chapters==== \\ \\ To create a chapter it is necessary to establish the field that indicates the beginning of the chapter and the field that end it. \\ For this, we use the macros **##INI_CAP## and ##END_CAP##.** It is indifferent that the macros are entered in a text field (title) or in a value field, as well as a heading or in a check field. \\ \\ {{ :wiki:office-xone:tabla7.png?nolink&700 |}} \\ In this case the chapter is established for the whole table. \\ \\ \\ ==== Sections ==== \\ \\ To establish sections a similar system of the chapters is established, by using the macros **##INI_SEC## and #END_SEC##.**\\ In the sections we can establish values by default to the fields we need, with the macro **##VAL:valor_por_defecto##**.\\ \\ |Installer Code: ##INI_SEC## |##VAL:0123456##| |Normative |##VAL:R.A.E. 1.966##| |Owner| | |Address | #END_SEC## | \\ \\