Task for the laboratory work

Free Articles

Contest:

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

1.Task for the research lab work.

2.Theory portion.

2.1.
Build-in FoxProw bids

2.2.
OLE

3.
Practical use of informations of informations transportation.

4.
Technical installations & A ; literature used.

5.
Applications

1.
Undertaking for the research lab work.

The purpose of this work is to demo our ability to work with different Microsoft applications & A ; to bring forth the informations exchange between them, utilizing build-in bids, OLE instruments & A ; other possible installations.

In the practical illustration we will demo the informations transportation procedure utilizing the undermentioned Microsoft Applications: FoxPro, Excel & A ; Word.

Besides it is necessary to show the theory about the informations transportation for it is impossible to utilize all of them in the illustrations.

2. Theory portion.

There are several different ways to reassign informations from FoxPro to different Microsoft Applications & A ; frailty versa.

2.1.
Built-in FoxPro bids.

Operator can utilize severalconstitutional bids of FoxPro
such asExport, Import, Copy
and Append from
.

Now we would wish to show some helpful information about these operands.

The format of EXPORT is:

EXPORT TO & lt ; file & gt ;

[ FIELDS & lt ; field list & gt ; ]

[ & lt ; range & gt ; ]

[ FOR & lt ; expL1 & gt ; ]

[ WHILE & lt ; expL2 & gt ; ]

[ NOOPTIMIZE ]

[ [ TYPE ] DIF | MOD | SYLK | WK1 | WKS | WR1 | WRK | XLS ] ]

Remarks

Use EXPORT to utilize FoxPro informations in other package bundles.

If the table/.DBF you are exporting from is indexed, the new file created is created in the indexed order.

Clauses

& lt ; file & gt ;

Include the name of the file to which FoxPro exports informations. If you do non include an extension with the file name, the default extension for the specified file type is assigned.

FIELDS & lt ; field list & gt ;

Include FIELDS & lt ; field list & gt ; to stipulate which Fieldss are copied to the new file. If the FIELDS clause is omitted, all Fieldss are copied to the new file. Memo and general Fieldss are non copied to the new file even if their names are included in the field list.

& lt ; range & gt ;

The range clauses are: ALL, NEXT & lt ; expN & gt ; , RECORD & lt ; expN & gt ; , and REST. These are explained in the Overview of the FoxPro Language chapter in the FoxPro Language Reference. Commands which include & lt ; range & gt ; operate merely on the table/.DBF in the active work country.

You can stipulate a range of records to copy to the new file. Merely the records that fall within the scope of records specified by the range are copied to the new file.

The default range for EXPORT is ALL records.

FOR & lt ; expL1 & gt ;

If the FOR clause is included, merely records that satisfy the logical status & lt ; expL1 & gt ; are copied to the new file. Including the FOR clause lets you conditionally copy records, filtrating out unsought records.

Rushmore optimizes an Export… FOR & lt ; expL1 & gt ; bid if & lt ; expL1 & gt ; is an optimizable look. For best public presentation, use an optimizable look in the FOR clause. A treatment of Rushmore optimizable looks appears in the Optimizing Your Application chapter in the FoxPro Developer ‘s Guide.

WHILE & lt ; expL2 & gt ;

If the WHILE clause is included, records are copied to the new file for every bit long as the logical look & lt ; expL2 & gt ; evaluates to true ( .T. ) .

NOOPTIMIZE

To do Rushmore non to optimise EXPORT, include NOOPTIMIZE. For more information, see SET OPTIMIZE and the Rushmore treatment in the Optimizing Your Application chapter of the FoxPro Developer ‘s Guide

.

Type

You must stipulate the type of file to be created. The TYPE key word is optional, but you must stipulate one of the following file types.

DIF

When you specify DIF, each field from a FoxPro table/.DBF becomes a vector ( column ) and each record becomes a tuple ( row ) in a DIF ( Data Interchange Format ) file, used by VisiCalc. The new file name is assigned a.DIF extension if an extension is n’t included in & lt ; file & gt ; .

Mod

Use the MOD clause to export to a file in Microsoft Multiplan version 4.01 MOD format. The new file name is assigned an.MOD extension if you do n’t include an extension in & lt ; file & gt ; .

SYLK

A SYLK file is a Symbolic Link interchange format ( used by Microsoft Multiplan ) in which each field from a FoxPro table/.DBF becomes a column in the spreadsheet and each record becomes a row. By default, SYLK file names have no extension.

WK1

Include this option to make a Lotus 1-2-3 spreadsheet from a FoxPro table/.DBF. A.WK1 extension is assigned to the spreadsheet file name for usage with Lotus 1-2-3 alteration 2.x. Each field from the table/.DBF becomes a column in the new spreadsheet, and each record in the table/.DBF becomes a spreadsheet row.

WKS

A Lotus 1-2-3 spreadsheet can be created from a FoxPro table/.DBF with this option. A.WKS extension is assigned to the spreadsheet file name for usage with Lotus 1-2-3 alteration 1-A. Each field from the table/.DBF becomes a column in the new spreadsheet, and each record becomes a row in the spreadsheet.

WR1

Include this option to make a Lotus Symphony spreadsheet from a FoxPro table/.DBF. A.WR1 extension is assigned to the spreadsheet for usage with Symphony version 1.01. Each field from the table/.DBF becomes a column in the new spreadsheet, and each record in the table/.DBF becomes a row in the spreadsheet.

WRK

A Lotus Symphony spreadsheet can be created from a FoxPro table/.DBF with this option. A.WRK extension is assigned to the spreadsheet file name for usage with Symphony version 1.10. Each field from the table/.DBF becomes a column in the new spreadsheet, and each record in the table/.DBF becomes a row in the spreadsheet.

Forty

Include XLS to make a spreadsheet you can utilize in Microsoft Excel. Each field in the +selected table/.DBF becomes a column in the spreadsheet ; each table/.DBF record becomes a row in the spreadsheet. An.XLS file name extension is assigned to the freshly created spreadsheet file unless you specify a different extension.

The format of IMPORT is:

Import FROM & lt ; file & gt ;

[ TYPE ]

FW2 | MOD | PDOX | RPD | WK1 | WK3 | WKS | WR1 | WRK | XLS

As it shown in format ( TYPE ) there are many possible Microsoft applications to import from to FoxPro but the significance of these belongingss, description of which you can see in the old chapter, that & # 8217 ; s why it & # 8217 ; s non necessary to name all of them once more. So we will advert those most common used.

Remarks

Most package bundles store their informations in a file format that can non be opened straight in FoxPro. IMPORT creates a new FoxPro table/.DBF from informations stored in file formats that FoxPro can non read.

A new table/.DBF is created with the same name as the file the information is imported from. A.DBF extension is assigned to the freshly created table/.DBF.

Clauses

& lt ; file & gt ;

& lt ; file & gt ; is the name of the file to import informations from. If you do n’t include an extension with the file name, the default extension for the specified file type is assumed.

Type

The cardinal word TYPE is optional, but you must include one of the following file types described below.

PDOX

Include PDOX to import Paradox files. Database files in Paradox versions 3.5 and 4.0 by Borland can be imported by including the PDOX option.

Forty

Include XLS to import informations from Microsoft Excel spreadsheets versions 2.0, 3.0 and 4.0. Column from the spreadsheet become Fieldss in the table/.DBF, and the spreadsheet rows become records in the table/.DBF. Spreadsheet files created in Microsoft Excel have an.XLS extension.

The format of COPY is:

COPY TO & lt ; file & gt ;

[ FIELDS & lt ; field list & gt ; ]

[ & lt ; range & gt ; ]

[ FOR & lt ; expL1 & gt ; ]

[ WHILE & lt ; expL2 & gt ; ]

[ [ WITH ] CDX ] | [ [ WITH ] PRODUCTION ]

[ NOOPTIMIZE ]

[ [ TYPE ] [ FOXPLUS | DIF | MOD | SDF | SYLK| WK1 | WKS | WR1 | WRK | XLS |

DELIMITED [ WITH & lt ; delimiter & gt ; WITH BLANK | WITH TAB ] ] ]

Remarks

If an index order is set, records are copied in maestro index order.

Clauses

& lt ; file & gt ;

The name of the new file to which COPY TO transcripts informations is specified with & lt ; file & gt ; . If you do non include an extension with the file name, the default extension for the specified file type is assigned. If you do non stipulate a file type, COPY TO creates a new table/.DBF and assigns the table/.DBF file name the default extension.DBF.

FIELDS & lt ; field list & gt ;

If you include FIELDS and a field list, you can stipulate which Fieldss are copied to the new file. If the FIELDS clause is omitted, all Fieldss are copied to the file. If the file you are making is non a database, memo Fieldss are n’t copied to the new file even if memo field names are included in the field list.

& lt ; range & gt ;

The range clauses are: ALL, NEXT & lt ; expN & gt ; , RECORD & lt ; expN & gt ; , and REST. These are explained in the Overview of the FoxPro Language chapter in the FoxPro Language Reference. Commands which include & lt ; range & gt ; operate merely on the table/.DBF in the active work country.

You can stipulate a range of records copied to a file. Merely the records that fall within the scope of records specified by the range are copied.

The default range for COPY TO is ALL records.

FOR & lt ; expL1 & gt ;

If the FOR & lt ; expL1 & gt ; clause is included, merely the records for which the logical status & lt ; expL1 & gt ; evaluates to true ( .T. ) are copied to the file. Include FOR & lt ; expL1 & gt ; to conditionally copy records, filtrating out unsought records.

Rushmore optimizes COPY TO with a FOR & lt ; expL1 & gt ; clause if & lt ; expL1 & gt ; is an optimizable look. For best public presentation, use an optimizable look in the FOR & lt ; expL1 & gt ; clause. A treatment of Rushmore optimizable looks appears in the Optimizing Your Application chapter in the FoxPro Developer ‘s Guide.

WHILE & lt ; expL2 & gt ;

If WHILE & lt ; expL2 & gt ; is included, records are copied every bit long as the logical look & lt ; expL2 & gt ; evaluates to true ( .T. ) .

[ WITH ] CDX | [ WITH ] PRODUCTION

If the table/.DBF you copy from has a structural index file, you can make a structural index file for the new table/.DBF. Including CDX or PRODUCTION creates an indistinguishable structural index file for the new table/.DBF. The tickets and index looks from the original structural index file are copied to the new structural index file. The CDX and PRODUCTION c

lauses have the same consequence.

Do non include CDX or PRODUCTION if you are copying to a file other than a new FoxPro table/.DBF.

NOOPTIMIZE

Include NOOPTIMIZE to do Rushmore to non optimise COPY TO. For more information, see SET OPTIMIZE or confer with the treatment of Rushmore optimisation in the Optimizing Your Application chapter in the FoxPro Developer ‘s Guide.

Type

If the file you are making is n’t a FoxPro table/.DBF, you must stipulate its file type. Although you must stipulate a file type, you need non include the cardinal word TYPE. You can make a broad assortment of different file types including DELIMITED ASCII text files in which you can stipulate a field delimiter.

FOXPLUS

FoxPro memo files have a different construction than FoxBASE+ memo files. If your beginning FoxPro table/.DBF contains a memo field, include the FOXPLUS clause to make a table/.DBF that can be used in FoxBASE+ . The FoxPro memo field can non incorporate binary informations because FoxBASE+ does non back up binary informations in memo Fieldss.

SDF

An SDF ( System Data Format ) file is an ASCII text file in which records have a fixed length and terminal with a passenger car return and line provender. William claude dukenfields are n’t delimited. The SDF file name is assigned a.TXT file extension if you do non include an extension.

SYLK

A SYLK file is a Symbolic Link interchange format ( used in Microsoft MultiPlan ) in which Fieldss from the FoxPro table/.DBF become columns in the spreadsheet and records become rows. SYLK file names have no extension.

DELIMITED [ WITH & lt ; delimiter & gt ; | WITH BLANK | WITH TAB ]

A DELIMITED file is an ASCII text file in which each record ends with a passenger car return and line provender. The default field centrifuge is a comma. Since character informations may include commas, character Fieldss are to boot delimited with dual citation Markss.

In the undermentioned illustration there are 2 character Fieldss ( “ Smith ” and “ TELEPHONE ” ) delimited with dual citation Markss. There is one numeral field which is non delimited since numeral information does non incorporate commas. The 3 Fieldss are separated with commas.

“ Smith ” , 9999999, “ Telephone ”

The DELIMITED WITH & lt ; delimiter & gt ; option can be used to replace the dual citation Markss with one of your pick.

The comma is non genuinely a delimiter. However, the DELIMITED WITH BLANK or DELIMITED WITH TAB clauses allow you to replace the comma field centrifuge with either a infinite or a check. The informations should non incorporate embedded infinites or checks.

You can non unite the WITH & lt ; delimiter & gt ; clause with either the WITH BLANK or WITH TAB clauses.

Unless you specify otherwise, a.TXT extension is assigned to all freshly created DELIMITED files.

The format of APPEND is:

APPEND FROM & lt ; file & gt ; | ?

[ FIELDS & lt ; field list & gt ; ]

[ FOR & lt ; expL & gt ; ]

[ [ TYPE ] [ DELIMITED [ WITH TAB | WITH & lt ; delimiter & gt ; | WITH BLANK ] |

DIF | FW2 | MOD | PDOX | RPD | SDF | SYLK | WK1 | WK3 | WKS |

WR1 | WRK | XLS ] ]

Remarks

The file you are add oning from is assumed to be a FoxPro tabular array with a.DBF extension. If the file you want to add on from is a FoxPro tabular array and does n’t hold a.DBF extension, you must stipulate its extension. If the file is a non a FoxPro tabular array, you must stipulate the type of file you append from.

Before you can add on from a tabular array created in dBASE IV that contains a memo field, you must first open the tabular array in FoxPro with USE. You are prompted with “ Convert MEMO file to FoxPro Format? ” Choose Yes.

If you append from a FoxPro tabular array, the tabular array you append from can be unfastened in another work country. You can besides add on from a tabular array that is n’t unfastened but is available on disc and a shared tabular array opened when SET EXCLUSIVE is OFF. When the tabular array you append from contains records marked for omission, the records are non marked for omission after they are appended.

If you include the? clause alternatively of including a tabular array name, the Open duologue appears so you can take a tabular array to add on from.

Clauses

& lt ; file & gt ;

Stipulate the name of the file to add on from with & lt ; file & gt ; . If you do n’t include a file name extension, the default extension.DBF is assumed.

FIELDS & lt ; field list & gt ;

APPEND FROM supports an optional & lt ; field list & gt ; . Data is merely appended to the Fieldss specified in the field list.

FOR & lt ; expL & gt ;

The full beginning file is appended to the tabular array unless you include the FOR clause. If the FOR clause is included, a new record is appended for each record in the file beginning for which & lt ; expL & gt ; evaluates to a logical true ( .T. ) . Records are appended until the terminal of the file is reached.

Type

If the file you are add oning from is n’t a FoxPro tabular array, you must stipulate the file TYPE. Although you must stipulate the file type, you need non include the cardinal word TYPE. You can add on from a broad assortment of different file types including DELIMITED ASCII text files in which you can stipulate a field delimiter.

If the file you are add oning from does n’t hold the usual default file extension for that type of file, the beginning file name must include the file ‘s extension. For illustration, Microsoft Excel spreadsheets usually have an.XLS file name extension. If the spreadsheet you are add oning from has an extension other than the expected.XLS, be certain to stipulate the extension.

Caution When add oning from a spreadsheet, the informations in the spreadsheet must be stored in a row major order instead than a column major order. This allows the appended spreadsheet informations to fit the tabular array construction.

DELIMITED [ WITH TAB | WITH & lt ; delimiter & gt ; | WITH BLANK ]

A DELIMITED file is an ASCII text file in which each record ends with a passenger car return and line provender. Field contents are by default assumed to be separated from each other by commas, and character field values to be to boot delimited by dual citation Markss. For illustration:

“ Smith ” , 9999999, “ Telephone ”

The DELIMITED WITH TAB option can be used to stipulate files which contain Fieldss separated from each other by checks instead than commas. The DELIMITED WITH & lt ; delimiter & gt ; option can be used to bespeak that character Fieldss are delimited by a character other than the citation grade. The DELIMITED WITH BLANK option can be used to stipulate files which contain Fieldss separated by infinites alternatively of commas. The file extension is assumed to be.TXT for all bounded files.

You can import day of the months from delimited files if the day of the months are in proper day of the month format. The day of the month format defaults to ‘mm/dd/yy ‘ . Including the century part of a day of the month is optional. FoxPro will import a day of the month that includes the century. If the century is n’t included in a day of the month ( for illustration ’12/25/92 ‘ ) , the Twentieth century is assumed. Date delimiters can be any non-numeric character except the delimiter that separates the Fieldss in the bounded file.

Dates in other formats can be imported if their format matches a day of the month format available in SET DATE. To import day of the months that are non in the default format, issue SET DATE with the proper day of the month format before utilizing APPEND FROM. To prove if a day of the month format can be successfully imported, utilize it with CTOD ( ) . If the day of the month is acceptable to CTOD ( ) , the day of the month will import decently.

FW2

FW2 files are created by Framework II. FW2 file names are assumed to hold a.FW2 extension.

RPD

RPD files are created by RapidFile version 1.2. RPD file names are assumed to hold an RPD extension.

SDF

An SDF ( System Data Format ) file is an ASCII text file in which records have a fixed length and terminal with a passenger car return and a line provender. William claude dukenfields are non delimited. The file name extension is assumed to be.TXT for SDF files.

WK3

Datas from a Lotus 1-2-3 spreadsheet. Each column from the spreadsheet becomes a field in the tabular array ; each spreadsheet row becomes a record in the tabular array. A.WK3 file name extension is assigned to a spreadsheet created in Lotus 1-2-3 alteration 3.x.

2.2. OLE.

Another method of informations exchange between non merely FoxPro but between all Windows based applications is OLE ( OBJECT LINKING AND EMBEDDING )

First you can utilize a FoxPro built in bid Append General.

APPEND GENERAL & lt ; general field & gt ; FROM & lt ; file & gt ;

[ LINK ]

[ CLASS & lt ; ole category & gt ; ]

APPEND GENERAL is supported in FoxPro for Windows merely.

If an OLE object already exists in the general field, it is replaced with the OLE object from the file.

Clauses

& lt ; general field & gt ;

Include & lt ; general field & gt ; to stipulate the name of the general field the OLE object is placed in. You can stipulate a general field in a tabular array unfastened in a noncurrent work country by including the tabular array assumed name with the field name.

& lt ; file & gt ;

Include & lt ; file & gt ; to stipulate the file incorporating the OLE object. You must include the full file name, including its extension. If the file is located in a directory other than the current default directory, include the way with the file name.

Link

If LINK is included, a nexus is created between the OLE object and the file that contains the object. The OLE object appears in the general field but the object ‘s definition remains in the file. If LINK is omitted, the OLE object is embedded in the general field.

CLASS & lt ; ole category & gt ;

Include the CLASS clause to stipulate an OLE category for an OLE object other than the default category.

Tip To find the category for an OLE object, run REGEDIT and double-click on the OLE object. The category name is listed under Identifier.

You can stipulate a category name when the file extension for the file incorporating the OLE object is different than the default extension and you want to coerce the behaviour for the category. If the default extension can be used by multiple OLE waiters, include the category to stipulate a peculiar waiter.

3. Practical use of informations transportation.

In applications you can happen the illustrations of the above mentioned bids usage and their consequences in different Microsoft Applications ( FoxPro, Word & A ; Excel ) .

4.
Technical installations & A ; literature used.

During making this plan the undermentioned equipment & A ; package was used:

Pentium 100 MHz Personal computer with 8 Mb RAM

Microsoft Windows & # 8217 ; 95

Microsoft Visual FoxPro 3.0

Microsoft Word 7.0

Microsoft Excel 7.0

Printer Hewlett Packard LaserJet5L

No particular literature but build-in HELP of Visual FoxPro 3.0, Word 7.0, Excel 7.0 & A ; utile advices was used to make this research lab work.

5. Applications.

Application 1

& # 8220 ; Transfering informations signifier FoxPro to Word & A ; Excel & # 8221 ;

Application2
& # 8220 ; FoxPro database converted to Excel ( .xls ) file & # 8221 ;

Application 3

& # 8220 ; FoxPro database converted to Word ( .sdf ) file & # 8221 ;

Application 4

& # 8220 ; FoxPro base converted in Word file – in Excel & # 8221 ;

Application 5

& # 8220 ; Excel file in Word & # 8221 ;

Post a Comment

Your email address will not be published. Required fields are marked *

*

x

Hi!
I'm Katy

Would you like to get such a paper? How about receiving a customized one?

Check it out