Complex Excel Uploads #69
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This feature enables the use of "EXCEL MAPS". It will enable a series of cells / ranges to be dynamically extracted from anywhere within a workbook - either through absolute / relative positioning, or by reference to a "matched" (search) string.
Data is always loaded to the same target table - MPE_EXCEL_UPLOADS
To drive the behaviour, a new configuration table must be added to the control library - MPE_EXCEL_MAP. The columns are defined as follows:
Sheet2
- an absolute reference/1
- the first tab in the workbookABSOLUTE F4
- an absolute referenceRELATIVE R[2]C[2]
- In the XMLMAP_START case, this is the same asABSOLUTE B2
MATCH P R[0]C[2]: My Test
- search column P for the string "My Test" then move 2 columns rightMATCH 7 R[-2]C[-1]: Top Banana
- search row 7 for the string "Top Banana" then move 2 rows up and 1 column leftBLANKROW
- search down (from XLMAP_START) until an entirely blank row is found, then choose the row above itLASTDOWN
- The last non blank cell below the XLMAP_START cellRELATIVE R[x]C[x]
case, this is offset from from XLMAP_START rather than A1To illustrate with an example - consider the following excel. The yellow cells need to be imported.
The MPE_EXCEL_MAP configuration entries might (as there are multiple ways) be as follows :
MATCH B R[1]C[0]: ITEM
LASTDOWN
MATCH C R[1]C[0]: AMOUNT
LASTDOWN
ABSOLUTE F6
MATCH F R[2]C[0]: CASH BALANCE
MATCH E R[0]C[2]: Rent/mortgage
MATCH E R[0]C[2]: Cell phone
To import the excel, the end user simply needs to navigate to the UPLOAD tab, select the appropriate map (eg MAP01), and upload. This will stage the new records in MPE_EXCEL_UPLOADS which will go through the usual approval process and quality checks. A copy of the source excel file will be attached to each upload.
The corresponding MPE_EXCEL_UPLOADS table will appear as follows:
Some additional notes:
UI Changes
Given that these uploads are not an "EDIT" (yet, an edit can be accurately described as a "LOAD") the top bar should be modified as follows:
The LOAD screen can then have a dropdown in the left similar to VIEW, but this time with "Tables" and "Files" as follows:
The Tables view is the regular menu (showing LIB.DS values from MPE_TABLES). The Files view will show a list of XLMAP_ID's from MPE_EXCEL_MAP.
Tasks: