Word Document Properties


 Open Excel and load the document that you want to export



Download 8,82 Mb.
Pdf ko'rish
bet202/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   199   200   201   202   203   204   205   206   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

1. Open Excel and load the document that you want to export.
2. Select the Developer tab on the Ribbon.
3. Click XML Source.
You see the XML Source task pane.
4. Click XML Maps in the XML Source task pane.
Excel displays the XML Maps dialog box.
245
Chapter 11: VBA Programming with XML
17_046500 ch11.qxp 12/5/06 5:37 PM Page 245


5. Click Add in the XML Maps dialog box.
The Select XML Source dialog box appears. This dialog box works the
same as any other file-opening dialog box. The filter makes it easy to
locate XSD files on your system.
6. Locate the XSD file you want to use and then click Open.
Excel adds the new map to the XML Maps dialog box.
7. Click OK to close the XML Maps dialog box.
Excel displays the new map in the XML Source task pane.
8. Right-click the element you want to map in the XML Source task pane,
and choose Map Element from the context menu.
9. Highlight the data you want to map to the element, and press Enter.
Excel changes the appearance of the data so that it looks like a database
entry, as shown earlier, in Figure 11-4.
10. Repeat Steps 8 and 9 for every data element in the XSD file.
Exporting the data to disk
After you create a schema and link it to an Office document, you can perform
a true export of the information as XML. There are two separate methods to
perform this task. The first, 
ExportXml
, creates a string that you can manip-
ulate by using various XML features built into Office. The second, 
Export
,
performs a standard export to a file. Listing 11-2 shows examples of both
methods.
Listing 11-2
Two Methods for Exporting XML Data
Public Sub OutputInventory2()
‘ Use the ExportXml technique to save data and the 
‘ data interpretation.
MsgBox Workbooks(1).XmlMaps(“Items_Map”).ExportXml()
‘ Use the standard Export method to create a file.
Workbooks(1).XmlMaps(1).Export “ExcelXML2.XML”, True
End Sub
In both cases, you rely on collections to obtain the information. Notice that
you can use a number or a string to reference the particular XML map that
you want to use for export purposes. Both the 
ExportXml
and 
Export
meth-
ods include an optional argument that forces the parser to check the XML for
246

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   199   200   201   202   203   204   205   206   207




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish