Académique Documents
Professionnel Documents
Culture Documents
Before expor t ing a t able, in t he Navigat ion Pane, you can first click t he t able. Then, on t he Ribbon, click Ext er nal Dat a . I n t he Export
I n t he Navigat ion Pane, right - click t he desired t able, posit ion t he m ouse on Export , and click Excel
This would open t he Export - Excel Spreadsheet dialog box w it h t he pat h w here t he file will be saved. The default folder is t he My Docum ent s:
The dialog box pr ovides var ious opt ions. For exam ple, if you have Micr osoft Office Excel 2007 , you can accept t he form at w it h .xlsx ext ension. I f you have a previous version, click t he ar row of t he File Form at com bo box and select t he ver sion. Aft er m aking t he select ions, you can click OK. When t he export ing is over, a m essage box would let you know.
I n t his case, t he spreadsheet is ready. When you im port such a spreadsheet , Microsoft Access w ould be able t o figur e out where t he list st ar t s and w here it ends. Micr osoft Access can even ident ify t he colum n nam es and t heir r ecor ds ( w here t he records st art and w here t hey end) . The dat abase engine can also ident ify t he dat a t ype of each colum n, based on t he values used in t heir fields. On t he ot her hand, you m ay have cr eat ed a spreadsheet t hat includes sect ions ot her t han t he list you want t o use in your dat abase. Here is an exam ple:
I f you t ry t o direct ly im port such a spreadsheet , t he dat abase engine m ay get confused. I t w ould not know w her e t he act ual list st art s and where it ends. I f you insist , you can st ill im port t he spreadsheet but you w ould get unpr edict able result s. I f you creat e a spreadsheet in Micr osoft Excel, Corel Paradox, or Lot us 1- 2- 3, and if t he spreadsheet cont ains a m ix of t he desir ed list and ot her it em s, you can cr eat e a " nam e" for t he list . To creat e a nam e in Microsoft Excel, select t he list :
Then, on t he Ribbon, click Form ulas. I n t he Defined Nam es sect ion, click t he Define Nam e... but t on. I n t he New Nam e dialog box, specify t he nam e and click OK. To cr eat e a nam e in t he ot her applicat ions, check t heir docum ent at ion. Aft er cr eat ing, pr eparing and saving t he spr eadsheet , you can im port it . To do t his in Microsoft Access, st art a dat abase:
On t he Ribbon, click Ext ernal Dat a. I n t he I m por t sect ion, click t he Excel but t on I f you have creat ed a t able t hat w ill r eceive t he dat a, in t he Navigat ion Pane, right - click t hat t able, posit ion t he m ouse on I m por t , and click Excel
This would st art t he Get Ext ernal Dat a - Excel Spreadsheet wizar d. You would t hen have t o specify t he file t hat holds t he spreadsheet , and click OK. I n t he second page of t he w izar d, you w ould be asked t o ident ify t he sect ion ( sheet ) wher e t he t able exist s. You w ould also have t he opport unit y t o provide som e det ails about t he dat a being im por t ed. I nst ead of m anually im por t ing a spr eadsheet , you can select t he values in a spr eadsheet , copy t hem , and past e t hem in a t able in Microsoft Access.
Pr actical Lear ning: I m por ting a M icr osoft Excel Spr eadsheet
I f you do n ot h ave M icr osoft Office Ex ce l 2 0 0 7 , sk ip t h is sect ion 1. From t he resour ces t hat accom pany t hese lessons, open t he Clar ksville I ce Cream .xlsx file. Not ice a spr eadsheet nam ed Em ployees 2. Select cells from C5 t o F10 3. On t he Ribbon, click Hom e and, in t he Clipboard sect ion, click Copy 4. Ret urn t o Microsoft Access and click t he Hom e t ab on t he Ribbon 5. On t he t able, click Add New Field and, in t he Clipboard sect ion of t he Hom e t ab of t he Ribbon, click t he Past e but t on
6. When you r eceive a m essage box let t ing you know t hat a few records w ould be creat ed, click Yes 7. Double- click I D, t ype Em ploye eI D and press Ent er 8. To save t he t able, on t he t it le bar, click t he Save but t on 9. Type Em ploye e s as t he nam e of t he new t able and click OK 10. Close t he t able W h et he r you h a ve M icr osoft Off ice Ex ce l 2 0 0 7 or n ot , con t inu e t h e le sson h e r e 1. On t he r ibbon, click Ext er nal Dat a
2. I n t he I m port sect ion, click Excel 3. I n t he Get Ext ernal Dat a - Excel Spr eadsheet , click Browse... 4. Locat e t he folder t hat cont ains t he r esources for our lessons and select it 5. Select t he Clarksville I ce Cream .xlsx file and click Open 6. I n t he Get Ext ernal Dat a - Excel Spr eadsheet , click OK 7. I n t he first page of t he w izard, click t he Show Nam ed Ranges r adio but t on and, in t he list , click Payr ollI nfor m at ion
8. Click Next 9. I n t he second page of t he wizar d, click t he Fir st Row Con t a ins Colum n H e a din gs check box
10. Click Next 11. I n t he t hir d page of t he w izar d, accept all default s and click Next 12. I n t he fourt h page of t he wizard, accept all default s and click Next 13. Set t he nam e of t he t able t o Pa yr oll and click Finish 14. I n t he last page of t he w izar d, click Close
15. I n t he Navigat ion Pane, double- click t he Payroll t able t o open it 16. Double- click I D, t ype Pa yr ollI D and press Ent er 17. Close t he Payr oll t able I f you do not h a ve M icr osoft Office Ex ce l 2 0 0 7 , follow t h e sa m e st eps t o im por t t h e Em ploye e s spre a dsh ee t .
On t he Ribbon, click Ext ernal Dat a and, in t he I m port sect ion, click t he Text File but t on I f you had pr eviously creat ed a t able t hat w ould receive t he values, in t he Navigat ion Pane, r ight - click t hat t able, posit ion t he m ouse on I m port , and click Text File
10. I n t he second page, accept t hat t he delim it er be set t o Com m a and check t he box st at ing: First Row Cont ains Field Nam es
11. Click Next 12. Accept t he default s of t he t hir d page of t he wizar d and click Next 13. Accept t o cont ent s of t he four t h page of t he w izard and click Next 14. Accept t o im por t t o t able St u den t s and click Finish 15. You receive a confir m at ion m essage w hen t he t able has been im por t ed. Click Close
16. I n t he Navigat ion Pane, double- click t he St udent s t able t o open it 17. Double- click I D, t ype St ude nt I D and press Ent er 18. Save and close t he St udent s t able
I n t he Navigat ion Pane, click t he t able you w ant t o expor t . On t he Ribbon, click Ext er nal Dat a and, in t he Export sect ion, click t he Text File but t on I n t he Navigat ion Pane, right - click t he t able t hat holds t he dat a, posit ion t he m ouse on Export , and click Text File
This w ould open t he Expor t - Text File dialog box w it h t he nam e of t he file using t he .t xt ext ension. The default folder w her e t he file would be saved is My Docum ent s. I f you want anot her , you can select it by clicking t he Br owse but t on. Once you ar e r eady t o export , you can click OK. This w ould open t he Export Text Wizard t hat you can follow:
You would have various opt ions t o specify how you want Micr osoft Access t o form at t he docum ent . You would also choose w het her t o include t he colum n header s or not .
Under it , t he global parent node st ar t s and closes it self: <?xm l ver s i on=" 1. 0" st andal one=" yes" ?> <FunFur ni t ur e> </ FunFur ni t ur e> This global par ent node is not t he t able. I nside t hat node, you should have a node t hat would represent a t able and it can repeat it self as m any t im es as necessar y: <?xm l ver s i on=" 1. 0" st andal one=" yes" ?> <FunFur ni t ur e> <Em pl oyees > </ Em pl oy ees> <Em pl oyees > </ Em pl oy ees> </ FunFur ni t ur e> Not ice t hat , in our exam ple, w hat we refer t o as a record is in plural. This is not requir ed. I t is j ust our choice. I n t his exam ple, t he Em ployees node is our t able. Put it anot her w ay, each Em ployees node r epresent s t he t able we want . I nside each t able, you should have t he nam e of each colum n followed by it s value: <?xm l ver s i on=" 1. 0" st andal one=" yes" ?> <FunFur ni t ur e> <Em pl oyees > <Em pl oyeeNum ber >924795</ Em pl oy eeNum ber > <Fi r st Nam e>Donal d</ Fi r st Nam e> <Las t Nam e>Tr i pl et on</ Las t Nam e> <Ti t l e>Sal es M anager </ Ti t l e> </ Em pl oy ees> <Em pl oyees > <Em pl oyeeNum ber >274957</ Em pl oy eeNum ber > <Fi r st Nam e>J eanne</ Fi r st Nam e> <Las t Nam e>W ool ey </ Last Nam e> <Ti t l e>Sal es Ass oc i at e</ Ti t l e> </ Em pl oy ees> <Em pl oyees > <Em pl oyeeNum ber >684078</ Em pl oy eeNum ber > <Fi r st Nam e>I r ene</ Fi r s t Nam e> <Las t Nam e>Pol s en</ Last Nam e> <Ti t l e>Sal es Ass oc i at e</ Ti t l e> </ Em pl oy ees> <Em pl oyees > <Em pl oyeeNum ber >297149</ Em pl oy eeNum ber > <Fi r st Nam e>M oni c a</ Fi r st Nam e> <Las t Nam e>Jack son</ Las t Nam e> <Ti t l e>Sal es Ass oc i at e</ Ti t l e> </ Em pl oy ees> </ FunFur ni t ur e> The group of nodes inside t he t able r epresent s t hat colum ns and t heir values. Of course an XML docum ent can be m ore t han t hat but t his is a t ypical st ruct ur e of a norm al XML docum ent t hat can be im port ed. Aft er creat ing and saving an XML file, you can im port it in Microsoft Access. To do t his, in t he Ext ernal Dat a t ab of t he Ribbon and in t he I m port sect ion, click t he XML File but t on . This would display t he Get Ext ernal Dat a - XML File dialog box. Aft er select ing t he file and clicking OK, a dialog w ould com e up t o help you ident ify t he t able t o use in t he docum ent . I t w ould display t he node( s) t hat indicat e( s) a t able.
9. Click OK 10. You receive a confirm at ion m essage. Click Close 11. I n t he Navigat ion Pane, double- click t he Em ployees t able t o open it 12. Double- click I D, t ype Em ploye e I D and press Ent er 13. Close t he Em ployees t able
Expor ting to X M L
I f you have creat ed a ( com plet e or sem i- com plet e) dat abase t hat you want t o use out side of Micr osoft Access, one way you can t ransfer it is t o change it s for m at int o XML. For t unat ely Micr osoft Access can t ake care of t he whole process for you. I n fact , besides export ing a t able, you can also ask Microsoft Access t o cr eat e bot h a schem a file and a st yle sheet for t he t able. To expor t a t able t o XML form at , in t he Navigat ion Pane:
Right - click t he t able t hat holds t he dat a, posit ion t he m ouse on Expor t , and click XML File Click t he t able you w ant t o expor t . On t he Ribbon, click Ext ernal Dat a and, in t he Expor t sect ion, click Mor e - > XML File
The Expor t - XML File dialog box t hat com es up allows you t o ver ify t he nam e of t he file t hat w ill be creat ed and t he pat h w here it will go. Once you are r eady, you can click OK. A dialog box w ould com e up asking which one( s) of t he t hree files you w ant t o have creat ed:
I f you want t o cr eat e a m or e elabor at e XML applicat ion wit h advanced opt ions, you can click t he More Opt ions but t on. This w ould close t he previous dialog box and open anot her one:
This dialog box allow s you t o specify m ore det ails on how t he t able should be export ed. For exam ple, you can change t he encoding schem e you w ant . The t w o opt ions available are UTF- 8 ( w hich should be enough for char act ers in US English) and UTF- 16 ( if you are planning t o use Unicode or int er nat ional charact ers) for char act er s refer red t o as wide char act ers. By default , w hen you ask Micr osoft Access t o cr eat e an ext ensible st yle sheet ( XSL) , it would creat e t he file using t he sam e nam e as t he t able. I f you w ant a different nam e, you can click t he Transform s but t on. This allow s you eit her t o select a different file or t o creat e t he file w it h a different nam e. Also, by default , if you ask Micr osoft Access t o cr eat e a schem a, it creat es an XSD file using t he sam e nam e as t he t able. I f you w ant a different nam e, you can click t he Schem a t ab and specify anot her nam e for t he file. Aft er m aking your select ions, you can click OK. The file( s) you specified would be cr eat ed in t he folder t hat w as indicat ed.
10. Click Next 11. Accept t he default s of t he second page of t he wizard and click Next 12. Accept t o cont ent s of t he t hird page of t he wizard and click Next 13. Accept t he suggest ed nam e of t he t able as Fu n dr a isin g and click Finish 14. You receive a confir m at ion m essage. Click Close 15. I n t he Navigat ion Pane, double- click t he Em ployees t able t o open it 16. Double- click I D, t ype Fu n dr a isin gI D and pr ess Ent er 17. Close t he Fundr aising t able
I f you want t o copy all colum ns and all r ecor ds, in t he Navigat ion Pane of Microsoft Access, r ight - click t he t able and click Copy. I n t he w eb page of t he applicat ion ( such as Micr osoft Fr ont Page or Micr osoft Expression Web) , right - click t he sect ion you want on t he w eb page and click Past e. Her e is an exam ple:
Em ployees
Em ploye e s
9 L 5C b [ b I { W { w a 5 { { w 9 Y t w a t a { w
I f you want t o copy all colum ns and all r ecor ds, open t he t able in Microsoft Access, press Ct rl + A t o select everyt hing. Press Ct rl + C t o copy. I n t he w eb page of t he applicat ion, click t he sect ion you w ant on t he web page and press Ct rl + V t o past e I f you want t o copy only som e colum ns and/ or som e records, open t he t able in Microsoft Access. Make t he select ion. Right - click t he select ion and click Copy. I n t he w eb applicat ion, r ight - click t he sect ion you want on t he web page and click Past e or click t he sect ion and press Ct r l + V
Som e ot her applicat ions do not suppor t copy and past e. An alt ernat ive is t o expor t t he t able t o HTML. To save a t able as HTML, in t he Navigat ion Pane:
Right - click t he t able t hat holds t he dat a, posit ion t he m ouse on Expor t , and click HTML Docum ent Click t he t able you w ant t o expor t . On t he Ribbon, click Ext ernal Dat a and, in t he Expor t sect ion, click Mor e - > HTML Docum ent
This would open t he Expor t - HTML Docum ent dialog box indicat ing t he folder w her e t he file will be saved, followed by t he nam e of t he file it self and it s .ht m l ext ension. Event ually, when t he file has been saved, it would be com plet e w it h all t he norm al HTML t ags. I f you want t he file t o dir ect ly be part of a w eb sit e or a web proj ect , you can change t he pat h t o point t o your w eb folder. I f you are only int erest ed in t he t able, let t he file be saved. Then, open t he code of t he docum ent , w hich you can do w it h any t ext edit or such as Not epad, copy only t he code of t he t able and past e it in t he desir ed sect ion of your act ual w eb page.
M ail M er ge
Mail m erging allow s you t o use dat a on your dat abase t o creat e let t er s, labels, envelopes, and ot her docum ent s t hat requir e ext ernal dat a originat ing from anot her docum ent . When perform ing a m ail m er ge, you usually do not need all t he fields t hat ar e par t of a t able. Alt hough you can use all fields on a t able, you can creat e a query m ade only of fields you need for your docum ent . This w ould include t he nam es and addr esses of t he recipient s. To st ar t a m ail m erge, in t he Navigat ion Pane:
Click t he t able t hat holds t he inform at ion you w ant t o use. On t he Ribbon, click Ext ernal Dat a. I n t he Export sect ion, click More - > Mer ge it wit h Microsoft Office Wor d Right - click t he t able, posit ion t he m ouse on Export and click Mer ge it wit h Micr osoft Office Word
This w ould open t he Micr osoft Wor d Mail Merge Wizard. I f you w ant t o creat e a new docum ent , click t he second r adio but t on:
And click OK. Micr osoft Word would open. I n t he Mail Mer ge w indow , if you want t o creat e a let t er t o be sent out , accept t he Let t ers r adio but t on
Ot herw ise, you can click anot her r adio but t on for t he t ype of docum ent you w ant t o cr eat e. Then click t he Next link. I n t he second page of t he w izard, you can specify w het her t o cont inue w it h t he current ly opened docum ent or you want t o use a t em plat e. For our exam ple, you would accept t o use t he current docum ent and click t he Next link. The t hir d page of t he w izard w ant s you t o specify t he list t hat holds t he fields t hat will be used. I f you w ant t o creat e a new list , you can click t he Type A New List r adio but t on. Ot herwise, t o use t he t able you select ed in Microsoft Access, accept t he first radio but t on and m ake sur e it is specified in t he Use An Exist ing List sect ion:
Once t he list is ready, click t he Next link. You would t hen have t o creat e t he docum ent
When cr eat ing t he let t er, you can edit t o insert differ ent t ypes of it em s. To add a field from t he list , in t he Mail Mer ge w indow, you can click More I t em s. This w ould open t he I nser t Mer ge Field dialog box:
I n t he I nser t Merge Field, you can click t he field you want t o add and click I nsert . You can cont inue doing t his for each field you want t o add:
To inser t ot her t ypes of it em s, in t he Mail Merge w indow, you can click t he Addr ess Block link, t he I nser t Addr ess Block dialog box w ould com e up:
The I nsert Address Block dialog box is m ade of var ious sect ions. I t allows you t o specify a t ype of greet ing and ot her pieces of infor m at ion t o be insert ed in t he docum ent . Aft er m aking t he select ion( s) , you can click OK. Aft er creat ing t he docum ent and adding t he necessar y fields t o it , you can pr eview and r eview it . To do t his, in t he Mail Mer ge window , click t he Next : Pr eview Your Let t ers link. When you do t his, t he let t er appears wit h t he value( s) of t he first record. To r eview t he docum ent wit h t he ot her values, in t he Mail Mer ge w indow , you can click t he previous or t he next but t ons.
Aft er review ing t he docum ent , in t he Mail Merge window , you can click t he Next : Com plet e The Mer ge link. You can t hen save, print , and m anage t he docum ent . I n t he sam e way, you can creat e labels or envelopes.
Aft er select ing t he obj ect , t he file, or t he addr ess book, click Next . The next pages of t he w izar d w ould assist you in ident ifying t he colum ns of t he list and com plet e t he t able.
Lesson Sum m ar y
W atts A Loan
1. Open t he Wat t s A Loan1 dat abase 2. Use t he Table but t on of t he Tables sect ion of t he Ribbon t o cr eat e a new t able. Replace I D w it h Em ploye eI D . Use t he Add New Field colum n t o cr eat e t he following addit ional colum ns Fir st N a m e , La st N a m e , Tit le , W or k Ph on e , Addr ess , Cit y , St a t e , ZI PCode , Cou nt r y , and H om e Ph one . Save t he t able as Em ploye e s and a dd t he r e cor ds t o it