Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating professional Excel Spreadsheets from basic data, utilising Database-to-Excel maps. Using the new functionality offered with the two new Version.

Similar presentations


Presentation on theme: "Creating professional Excel Spreadsheets from basic data, utilising Database-to-Excel maps. Using the new functionality offered with the two new Version."— Presentation transcript:

1 Creating professional Excel Spreadsheets from basic data, utilising Database-to-Excel maps. Using the new functionality offered with the two new Version 7 commands. (IMPXLDBF & CVTDBFXLSX)

2 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Scenario: There is a basic Excel spreadsheet.

3 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Scenario: From the basic Excel Spreadsheet, the following detail worksheets will be produced:-

4 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Scenario: From the basic Excel Spreadsheet, the following summary worksheet will be produced:-

5 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Scenario: The Excel Spreadsheet will be produced, with the following :- Importing of data from an existing basic spreadsheet, combining all worksheets into one database file. A Database-to-Excel Map to produce the Detail Spreadsheet (no Map is required for the Summary Worksheet). Combining existing database fields to create a new database file. Dynamic use of images. Footer showing Date, Worksheet Name and Page Numbers, utilising Excel placeholders. Distinctive Column Headings. Styling, including the reformatting of data and numeric field editing. Zebra formatting to make each row distinctive. Sorting, keeping the zebra formatting. Each different Make of Car in a separate worksheet. Summary worksheet utilising new Version 7 report breaks and summaries. Freezing of columns (new to Version 7). Overall professional finish.

6 IMPXLDBF is used to import data from the basic Excel Spreadsheet. The reference file is used as the basis to create the new database file, combining the worksheets into one member. Click to advance. An RPG program is used to combine the imported data with existing data and setup the images and the zebra formatting. Click to advance. Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Reference File MOTOR_IN IMPXLDBF The creation of the Excel Spreadsheets, are carried out in stages. RPG Program CVTDBFXLSX MOTOR_INMOTOR_OUT CVTDBFXLSX is used to create the detail Excel Worksheets, using the combined database file. Click to advance. CVTDBFXLSX is used to create the Summary Excel Worksheet, using the combined database file. Report Breaks and Summaries are utilised. Click to advance.

7 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Reference File Physical File (XYZ_REF) has to be created. The IMPXLDBF command can now be built to import the data from the Excel Spreadsheet. R MOTOR_R1 MAKE# 20 MODEL# 20 REGIST# 10 MILEAGE# 7 0 COLOUR# 10 ENGSIZE# 5 FUELTYP# 10 K MAKE# K MODEL#

8 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Importing the Excel Spreadsheet. The Import Excel to Database File (IMPXLDBF) command is built as follows:- COLNAMING is set to *TABLE and NAMING to *SYS, to allow the reference file to be used as the basis. FIRSTROW is set to 2, so the column headings are not imported.

9 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Importing the Excel Spreadsheet. The data has been imported from the Excel Spreadsheet, into the database file MOTOR_IN. The data now needs to be run through an RPG simple program to combine with existing data and setup dynamic images and zebra formatting.

10 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Combining imported data with existing data. The existing database contains the following data, keyed by REGISTRATION.

11 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Combining imported data with existing data. The new database file created, contains consolidated data and fields for the images and zebra formatting. This database file is used with the CVTDBFXLSX commands. A Database to Excel Map need creating for the Detail Spreadsheet.

12 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) How the Detail Database-to-Excel map will be constructed. Parent Row Group NEW_MAKE Sub Row Group (XYZDETAIL) IMAGES ModelSale Value Contact Number Registrat. Mileage Colour Engine Size Fuel Type Car Owner Company Logo TEXTS FIELDS Car Make MODEL# ENGSIZE# REGIST# OWNER# COLOUR# ESTVALUE# FUELTY# CONTACT NO# MILEAGE# ZEB#

13 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. The Database-to-Excel maps for the Detail Spreadsheet needs creating. WRKDBFXL is used followed by F6, or CRTDBFXL is used to the create the Detail Map @XYZ_MAP.

14 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. A Parent Row Group is added. This Row Group contains the dynamic images, the column headings and the option for separate worksheets, for each Car Make. Enter option ‘8’ against the @XYZMAP to add the Parent Row Group.

15 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. F6 is used to create the Parent Row Group.

16 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. Setting up the Parent Row Group is carried on two screens. The Row Group is named NEW_MAKE. A new Rule Group is setup to be effective on change of Car Make (MAKE#).

17 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. The second screen of the Parent Row Group setup, allows an event to be actioned, on change of MAKE#. Action is set to *NEWSHEET. The new sheets will be named, as the variable MAKE#.

18 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. Once the Parent Row Group has been created, cells need adding by enter ‘9’ against the Row Group.

19 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. The cells to be added to the Parent Row Group, are listed below:- Row Col Content Column name or constant text 1 A *IMAGE *PATH 1 E *IMAGE *PATH /home/lordg/xyzmotors.jpg 5 A *TEXT 'Model' 5 B *TEXT 'Registration' 5 C *TEXT 'Mileage' 5 D *TEXT 'Colour' 5 E *TEXT 'Engine Size' 5 F *TEXT 'Fuel Type' 5 G *TEXT 'Car Owner‘ 5 H *TEXT 'Contact No.' 5 I *TEXT 'Sale Value' Note that the cell for 1-A is an image and the scale is set to 0.60 x 0.60. The variable will add an image to the header, dependant on the image path stored in the database file (MOTOUR_OUT).

20 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. A Sub-Row Group is now created linked to the Parent. To create Sub-Row Group, enter ‘8’ against the Parent Row Group (NEW_MAKE), followed by F6. The Row-Group is named XYZDETAIL.

21 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Creating the Detail Database-to-Excel map. Once the Sub-Row Group has been created the cells are added, as below:- Row Col Content Column name or constant text 1 A *COLUMN MODEL# 1 B *COLUMN REGIST# 1 C *COLUMN MILEAGE# 1 D *COLUMN COLOUR# 1 E *COLUMN ENGSIZE# 1 F *COLUMN FUELTYP# 1 G *COLUMN OWNER# 1 H *COLUMN CONTACTNO# 1 J *COLUMN ZEB# 1 I *COLUMN ESTVALUE# The CVTDBFXLSX command can now built to create the Detail Excel Spreadsheet.

22 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Detail Excel Spreadsheet. The command is initially built with no formatting. At this point no applied or conditional formatting has been used. The header has been set to *NONE Excel Map @XYZ_MAP has been used.

23 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Detail Excel Spreadsheet. The spreadsheet has been created, as shown below (worksheet 1 of 4) :- The Car Make logo image has been dynamically placed at the top of the worksheet along with the Company Logo in the centre of the sheet. There is one cell (column J), that will have to be hidden, as this is used to apply Zebra formatting.

24 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Detail Excel Spreadsheet. Formatting the Detail Spreadsheet.  Column widths are applied as follows:- ColumnWidth B16 D11 E12 F11 G24 H18 I14  The following styles need to be created :- Style Font SizeText ColourBg ColourHz Align.Vr. Align.BorderHeight NEW_MAKE12.00*WHITE*LIGHTBLUE*CENTER*CENTER(Bottom) *THIN *BLACK 2 XYZDETAIL10.00*AUTO*NONE*CENTER*CENTER*NONE17 HIDDENF10.00*AUTO*NONE*GENERAL*BOTTOM*NONE*AUTOFIT ZEBRA112.00*AUTO*PALEBLUE*GENERAL*CENTER*NONE*AUTOFIT ZEBRA212.00*AUTO*PALEBLUE*GENERAL*CENTER*NONE*AUTOFIT FMTMGE112.00*BLACK*AQUA*GENERAL*CENTER*NONE*AUTOFIT FMTMGE212.00*BLACK*PALEBLUE*GENERAL*CENTER*NONE*AUTOFIT FMTESV112.00*BLACK*AQUA*GENERAL*CENTER*NONE*AUTOFIT FMTESV212.00*BLACK*PALEBLUE*GENERAL*CENTER*NONE*AUTOFIT Note: FMTMGE1 & 2 have a Number Format of *ACCOUNTING, 0 decimal places, thousand separator and no currency symbol. FMTESV1 & 2 have a Number Format of *ACCOUNTING, 0 decimal places, thousand separator and an’£’ currency symbol.

25 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Detail Excel Spreadsheet. The CVTDBFXLSX command is changed to apply formatting and set column widths.

26 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Detail Excel Spreadsheet. With formatting and columns widths applied, the following is produced :- To apply zebra formatting of the rows, conditional formatting is applied using column J (now hidden).

27 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Detail Excel Spreadsheet. The CVTDBFXLSX command is changed to include the Conditional Formatting. The EXCEL and XLSPRINT parameters are added to create the footer utilising Excel placeholders.

28 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Detail Excel Spreadsheet. The EXCEL and XLSPRINT parameters are now applied. The command for creating the Detail Excel Spreadsheet is now complete.

29 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Detail Excel Spreadsheet. The completed Detail Spreadsheet is shown below:-

30 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. The command is initially built with no formatting. The field containing the dynamic path of the images has been excluded. The Header parameter has been used to Freeze the first row containing the column headings.

31 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. The spreadsheet created, with no formatting is shown below.

32 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. Formatting the Summary Spreadsheet.  Column widths are applied as follows:- ColumnWidth B15 D10 E10 F8F8 G8G8 J10  The following styles are created :- Style Font SizeText ColourBg ColourHz Align.Vr. Align.BorderHeight SUMMEAD 10.00*BLACK*TAN*GENERAL*BOTTOM*NONE*AUTOFIT SUMMHEADC10.00*BLACK*TAN*CENTER*BOTTOM*NONE*AUTOFIT ZEBRA310.00*AUTO *LIGHTYELLOW *GENERAL*CENTER*NONE*AUTOFIT ZEBRA410.00*AUTO *YELLOWWHITE *GENERAL*CENTER*NONE*AUTOFIT ZEBM110.00*AUTO *LIGHTYELLOW *GENERAL*CENTER*NONE*AUTOFIT ZEBM2 10.00*AUTO *YELLOWWHITE *GENERAL*CENTER*NONE*AUTOFIT SUMM_LINE10.00*BLACK*PALEBLUE*GENERAL*BOTTOM*NONE*AUTOFIT Note: ZEBM1 & 2 have a Number Format of *ACCOUNTING, 0 decimal places, thousand separator and no currency symbol.

33 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. The command now has styles applied, conditional formatting applied and the column widths set.

34 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. The spreadsheet created, now contains style formatting. Column K is now hidden, as it does not need to be shown. Now the EXCEL and XLSPRINT parameters are used to name the worksheet, set the margins and format the page footer.

35 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. The command now uses the EXCEL and XLSPRINT parameters.

36 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. The worksheet is now named and the page layout has been setup. Finally, the new functionality that version 7 offers (RPTSMRY and RPTBRKS) can be applied.

37 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. The following is added to the command. These additional parameters, allow sections of the spreadsheet to be collapsed and expanded.

38 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. The worksheet now contains report breaks and summaries.

39 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. Clicking ‘-’ to collapse the groups will have the following result:-

40 Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX) Using CVTDBFXLSX to create the Summary Spreadsheet. Clicking the ‘+’ to expand groups will have the following result:-

41 Appendix. Colour Chart for use when styling. Creating Excel workbooks using new Version 7 commands (IMPXLDBF & CVTDBFXLSX)


Download ppt "Creating professional Excel Spreadsheets from basic data, utilising Database-to-Excel maps. Using the new functionality offered with the two new Version."

Similar presentations


Ads by Google