OFC305 Advanced XML Programming In Excel 2003 Joseph Chirilov Program Manager.

Slides:



Advertisements
Similar presentations
Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005.
Advertisements

DEV351 ADO.NET Performance Pablo Castro Program Manager – ADO.NET Team Microsoft Corporation.
WEB401 Security Practices for Web Services (Part 2) Keith Ballinger Program Manager XML Messaging Microsoft Corporation.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Web Sites Testing with Visual Studio Team System Shai Raiten Sela Group
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Mike Henderlight Title: Program Manager.
Microsoft Office Open XML Formats Brian Jones Lead Program Manager Microsoft Corporation.
Tutorial 11: Connecting to External Data
OFC324 Microsoft Project Server: Putting Enterprise Project Management (EPM) To Work Sam Brooks
DAT304 Leveraging XML and HTTP with Sql Server Irwin Dolobowsky Program Manager Webdata Group.
OFC302 Building Smart Document Solutions in Word & Excel Martin Sawicki Lead Program Manager.
OFC 322 Building Office Research Web Services: Exposing Corporate Data Through Office Brian Jones Program Manager Authoring Services Martin Sawicki Lead.
DEV334 Creating Application Starting Points & Sharing Best Practices with Enterprise Templates Marc Gusmano Director of Emerging Technologies The Information.
OFC304 Excel 2003 Overview: XML Support Joseph Chirilov Program Manager.
ACOT Intro/Copyright Succeeding in Business with Microsoft Excel
MBL393 Location Aware Devices Chung Webster Application Development Consultant.
Using the Actions Pane, Host Controls, and Smart Tags
DEV290 Building Office Solutions with Visual Studio Eric Carter Lead Developer Developer Platform & Evangelism Microsoft Corporation.
DEV397 Windows Forms Databinding Mike Henderlight Program Manager Windows Forms Microsoft Corporation.
OFC293 Microsoft Office Access 2003 Overview SharePoint & XML Integration Richard Dickinson Program Manager.
DAT305 Boost Your Data-Driven Application Development Using SQL Server Centric.NET Code Generator Pascal Belaud Microsoft France.
OFC 303 Advanced Word XML: Customer-Defined Schemas Brian Jones Program Manager Authoring Services.
OFC335 Microsoft Office Word 2007 XML Programmability: True Data/View Separation and Rich Eventing for Custom XML Tristan Davis Program Manager Microsoft.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
DEV339 Best Practices for Debugging Visual Studio.NET Applications Keith Pleas Architect, Guided Design
OFC 308 Advanced Word XML: The WordML Schema and Bringing Everything Together Brian Jones Program Manager Authoring Services.
OFC 307 Office 2003 Solution Case Studies Ray Stephenson Smart Client Technical Evangelist
Web 310 XML Schema : What You Need to Know and Why Yasser Shohoud Program Manager XML Messaging Microsoft Corporation.
DEV337 Modeling Distributed Enterprise Applications Using UML in Visual Studio.NET David Keogh Program Manager Visual Studio Enterprise Tools.
Microsoft ® Office Excel 2003 Training Using XML in Excel SynAppSys Educational Services presents:
DEV333 Instrumenting Applications for Manageability with the Enterprise Instrumentation Framework David Keogh Program Manager Visual Studio Enterprise.
EBZ319 Building Enterprise Web Sites Using MCMS 2002 Daniel Kogan Program Manager CMS Group Microsoft Corporation Pat Miller Developer CMS Group Microsoft.
MBL206 A First Look at the Microsoft Location Server (MLS) Steve Lombardi Technical Product Manager MapPoint Business Unit Microsoft Corporation.
EBZ 321 Extending CMS 2002 Publishing Processes Scott Fynn Microsoft Consulting Services National Practices.
Building More Reliable And Better Performing Web Applications With Visual Studio 2005 Team System Gabriel Marius TLN312 Program Manager Microsoft Corporation.
OFC291 Microsoft® Office Word XML (part 1 of 3): Introduction Martin Sawicki Lead Program Manager.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
DAT 332 SQL Server 2000 Data Transformation Services (DTS) Best Practices Euan Garden Product Unit Manager SQL Server Development Microsoft Corporation.
MBL490 Deploying Applications to Smartphone and Microsoft® Powered Pocket PC Marcus Perryman Consultant.
EBIZ327 InfoPath and BizTalk Server 2004 Scott Woodgate Jupiter Product Planner.
Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005.
D301 Building solutions with the Project Data Service David Solomon InfoPath ADC Microsoft Corporation.
MSG331 Exchange Server 2000/2003 Software Development Kit Susan Hill Lead Programmer Writer Microsoft Corporation.
DAT300 SQL Server Notification Services: Application Development Ken Henderson Technical Lead, SQL Server Support Microsoft Corporation
MBL 305 ASP.NET Mobile Controls: Best Practices Gökşin Bakir CSA Yage Ltd. Microsoft Regional Director.
Microsoft Office Project 2003: A tour of the EPM Solution.
EBZ303 Building Applications Using BizTalk Human Workflow Services Nagender Vedula Group Program Manager E-Business Server Group Microsoft Corporation.
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Joe Stegman Title: Lead Program Manager Session code.
Ty Anderson, Damon Armstrong Cogent Company Session Code: OFC325.
EBIZ302 Jupiter Business Process Automation and Web Services David Fong Program Manager.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
EBZ306 Advanced Business Process Automation Using BizTalk Server 2004 David Fong Program Manager.
DAT200 Microsoft® ADO.NET for ADO Classic Developers: Introducing ADO.NET Jackie Goldstein Renaissance Computer Systems
MSG 334 Creating Exchange Administrative Scripting for the Non-Programmer Susan Hill Lead Programmer Writer Microsoft Corporation.
OFC311 Developing Microsoft Office InfoPath 2003 Solutions: Technical Drilldown Part 1 Tudor Toma Group Program Manager Office Microsoft Corporation.
EBIZ312 Connecting Host Systems to Microsoft Technologies Paul Larsen Aaron Grady Microsoft Corporation.
InfoPath: Developing Forms Using Managed Code Dan Green Paradigm Logic CLI312.
OFC320 Building EPM Solutions with Microsoft Project Server Ted Dinklocker Program Manager Microsoft Corp.
Building More Powerful ASP.NET Applications with IIS7 Michael Volodarsky COM303 Program Manager Microsoft Corporation.
DAT 390 Advanced ADO.NET Programming Techniques Jackie Goldstein Renaissance Computer Systems
Integrating SharePoint 2010 with Office 2010
Visual Studio Tools for Office 2005
Azure API Management Jothi Prakash A
Customizing your device experience with assigned access
Application Insights Diagnostics Preview
Visual Studio 2005 Tools For Office: Creating A Multi-tier Application
SPC Developer 1/18/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Visual Studio 2010 SharePoint Development Tools Overview
Windows Forms in Visual Studio 2005: An in-depth look at key features
Contexualized Data In Document Authoring
Presentation transcript:

OFC305 Advanced XML Programming In Excel 2003 Joseph Chirilov Program Manager

Resumes Joseph Chirilov Program Manager Excel Data Services demo demo

Exportability Data not exportable when you have: Fill down List of lists Sparse layout Data is exportable when required elements are not mapped Taskpane: Verify Map for Export OM: XmlMap.IsExportable

Schema Support W3C XML Schema 1.0 spec, except: Abstract elements Substitution groups xsd:any xsd:anyAttribute Recursive Structures Mixed Content Excel can derive XML schema from sample data

Object Model XML Scenarios Adding a schema / map Mapping non-repeating elements Mapping repeating elements Importing Exporting Querying for map structure & data Catching Import / Export Events

XmlMap Object Represents a schema attached to the workbook. Methods:.Import /.ImportXml.Export /.ExportXml.Delete Properties:.Schemas.DataBinding Many others…

Adding an XML map Workbook.XmlMaps.Add( Schema As String, [RootElementName] As String) As XmlMap Example: Set myMap = ActiveWorkbook.XmlMaps.Add( “C:\expense.xsd” )

XPath Object Representation of an element mapping in the spreadsheet Methods:.SetValue.Clear Properties:.Map.Repeating.Value

Mapping Non-Rep Elements Range.XPath.SetValue ( Map As XmlMap, XPath As String, [SelectionNamespace] As String, [Repeating] As Boolean ) Example: ActiveCell.XPath.SetValue( ActiveWorkbook.XmlMaps(1), “/Expense/Meta/FirstName”,, False )

Selection Namespace Example: If the XPath you want to map is: “/ns0:Expense/Meta/ns1:Firstname” then the selection namespace should be: “xmlns:ns0= xmlns:ns1=

ListObject Object Represents a List Methods:.Delete Many others… Properties:.DataBodyRange.ListColumns.Range.XPath.ListRows.Range.Name.XmlMap

Mapping Rep Elements ListColumn.XPath.SetValue ( Map As XmlMap, XPath As String, [SelectionNamespace] As String, [Repeating] As Boolean ) Example: Set myList = ActiveSheet.ListObjects.Add( xlSrcRange, Range(“A1:D10”)) myList.ListColumns(1).XPath.SetValue( ActiveWorkbook.XmlMaps(1), “/Expense/Meta/FirstName”,, False )

OM: Mapping Joseph Chirilov Program Manager Excel Data Services demo demo

Importing XML Data XmlMap.Import( Url As String, [Overwrite] As Boolean ) As XlXmlImportResult XmlMap.ImportXml( XmlData As String, [Overwrite] As Boolean ) As XlXmlImportResult

Importing XML Data Example: result = ActiveWorkbook.XmlMaps(1).Import( “\\expense\empinfo.xml” ) result = ActiveWorkbook.XmlMaps(1).ImportXml( sWSData )

XlXmlImportResult Import results are for non-failing imports only Only most severe condition is returned Possible results (in order of increasing severity): Success Schema validation failed Some data truncated to fit cell Failing imports will result in an run-time error

Exporting XML Data XmlMap.Export( Url As String, [Overwrite] As Boolean ) As XlXmlExportResult XmlMap.ExportXml( Data As String ) As XlXmlExportResult (Note: ‘Data’ is an IN/OUT variable)

Exporting XML Data Example: If ActiveWorkbook.XmlMaps(1).IsExportable Then… result = ActiveWorkbook.XmlMaps(1).Export( “C:\expenseData\JDoe.xml” ) Dim sData As String result = ActiveWorkbook.XmlMaps(1).ExportXml( sData ) (‘sData’ now contains exported data)

XlXmlExportResult Export results are for non-failing exports only Only most severe condition is returned Possible results (in order of increasing severity): Success Schema validation failed Failing exports will result in an run-time error Don’t forget to check exportability first!

OM: Import / Export Joseph Chirilov Program Manager Excel Data Services demo demo

Auto Map and Import Quick & easy way to import data without the need to map elements before hand Workbook.XmlImport( Url As String, ImportMap As XmlMap, [Overwrite], [Destination] ) As XlXmlImportResult Example: ActiveWorkbook.XmlImport “C:\expense.xml”, Nothing,, Range(“A1”) Workbook.XmlImportXml for in-memory strings

Query Methods Use XmlMapQuery to discover mappings, and XmlDataQuery to extract data from those mappings Worksheet.XmlMapQuery( XPath As String, [SelectionNamespaces] As String, [Map] As XmlMap ) As Range Worksheet.XmlDataQuery( XPath As String, [SelectionNamespaces] As String, [Map] As XmlMap ) As Range

Query Methods sXPath = “/Expense/Items/Amount” If Not XmlMapQuery(sXPath) Is Nothing Then Set myRange = XmlDataQuery(sXPath) … perform normal range manipulation … End If

Import Events Hang off Workbook and Application Object BeforeXmlImport( Map As XmlMap, Url As String, IsRefresh As Boolean, Cancel As Boolean ) AfterXmlImport( Map As XmlMap, IsRefresh As Boolean, Result As XlXmlImportResult )

Export Events Hang off Workbook and Application Object BeforeXmlExport( Map As XmlMap, Url As String, Cancel As Boolean ) AfterXmlExport( Map As XmlMap, Url As String, Result As XlXmlExportResult )

Event Examples Before Export: Validate sheet data according to business rules before export and cancel if rules are broken. Before Import: warn user that data will be discarded upon subsequent import / refresh After Import: Examine data that was imported (according to business rules, etc.) Enforce that a map is Import-only or Export-only

Web Services Getting data from web services is easier with Excel. Methods: Existing COM objects OfficeXP Web Services Toolkit 2.0 Visual Studio

Web Services Joseph Chirilov Program Manager Excel Data Services demo demo

Community Resources Most Valuable Professional (MVP) Newsgroups Converse online with Microsoft Newsgroups, including Worldwide User Groups Meet and learn with your peers

evaluations evaluations

© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.