ninjoe8 Posted October 5, 2006 Share Posted October 5, 2006 problem: i have a set of 15 xml files. each file contains 2 tags that i need to pull and put somewhere (preferrably an excel worksheet). how would i go about doing this? i am fairly new to the use of xml. thanks for any hints. Link to comment Share on other sites More sharing options...
sam.surya Posted October 6, 2006 Share Posted October 6, 2006 Hi,Can u provide sample file on this.Regards,kamal Link to comment Share on other sites More sharing options...
boen_robot Posted October 6, 2006 Share Posted October 6, 2006 In Excel, select:Data>XML>Import...and select all of the XMLs you want to import.If you want to make such thing automatically, you need to use a PHP script of some sort. I have no idea how this script will look though.There is another way too, but it's actually harder then to look for a pure PHP solution. You can combine all of your XMLs into one XML that will use the syntax that Excel understands. If that XML is opened in IE, it will result in Excel being opened in a frame. However, such XML looks pretty complex. Here's the minimal amount of code it must contain: <?xml version="1.0"?><?mso-application progid="Excel.Sheet"?><Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40"> <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> <Author>Your username</Author> <LastAuthor>Your username</LastAuthor> <Created>2006-10-06T20:17:55Z</Created> <Company>Your company</Company> <Version>11.8036</Version> </DocumentProperties> <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> <WindowHeight>12915</WindowHeight> <WindowWidth>15180</WindowWidth> <WindowTopX>480</WindowTopX> <WindowTopY>30</WindowTopY> <ProtectStructure>False</ProtectStructure> <ProtectWindows>False</ProtectWindows> </ExcelWorkbook> <Styles> <Style ss:ID="Default" ss:Name="Normal"> <Alignment ss:Vertical="Bottom"/> <Borders/> <Font x:CharSet="204"/> <Interior/> <NumberFormat/> <Protection/> </Style> </Styles> <Worksheet ss:Name="Sheet1"> <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> <Selected/> <Panes> <Pane> <Number>3</Number> <ActiveRow>39</ActiveRow> <ActiveCol>6</ActiveCol> </Pane> </Panes> <ProtectObjects>False</ProtectObjects> <ProtectScenarios>False</ProtectScenarios> </WorksheetOptions> </Worksheet></Workbook> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now