Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple referencing question

    I have a project for a spreadsheets course I am taking in which I need to import an XML file to excel. Forgive me for any lingo accompanied with this particular coding language, I'm not familiar with it at all. Just got thrown into the pool, essentially.

    Here's the code that I need to edit to reference a different file.

    XML file:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="Doc.xsd">

    <title>XYZ</title>
    <subtitle>network proposal</subtitle>
    <date>5-8-2012</date>
    <author>Justin Thompson</author>
    <filename>Thompson_Project</filename>
    The file name in which it is being imported it is Thompson_Project.xslx

    I also have a Doc.xsd file that came with the batch of files. Not sure if it is a relevant file or not.

    Anyway, trying to figure out what the issue is; when I try to import the file excel returns an error 'Invalid file reference. The path to the file is invalid, or one or more of the referenced schemas could not be found.'

    Any help majorly appreciated. I just started covering importing this week, and we have had no prior experience with XML editing.
    Last edited by kot91; 05-08-2012 at 06:13 PM.

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by kot91 View Post
    I have a project for a spreadsheets course I am taking in which I need to import an XML file to excel. Forgive me for any lingo accompanied with this particular coding language, I'm not familiar with it at all. Just got thrown into the pool, essentially.

    Here's the code that I need to edit to reference a different file.

    XML file:



    The file name in which it is being imported it is Thompson_Project.xslx

    I also have a Doc.xsd file that came with the batch of files. Not sure if it is a relevant file or not.

    Anyway, trying to figure out what the issue is; when I try to import the file excel returns an error 'Invalid file reference. The path to the file is invalid, or one or more of the referenced schemas could not be found.'

    Any help majorly appreciated. I just started covering importing this week, and we have had no prior experience with XML editing.
    Which version of Excel are you using? Importing XML into Excel is a little tricky. Assuming you are working with a modern day version of Excel (2010) then you would need to open a blank workbook and go to the Developer tab and click on XML -> Source. This opens up the XML Source window. Here you would pull in your XSD file to create an XML map between your schema and the spreadsheet. Once you have the schema added using the XML Maps button you can either drag and drop the elements onto the columns to map them or just right click on the top level element and auto map everything to the columns. Once that is done then you can click on Import to import your XML file.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    New Coder
    Join Date
    May 2012
    Posts
    34
    Thanks
    0
    Thanked 2 Times in 2 Posts
    I hope this is a relevant place for the question which I am going to ask. I am undergoing advance java these days, and I have come across various features, one of which is .xml. Now what is the purpose of xml in java ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •