+ Reply to Thread
Results 1 to 7 of 7

How to change the xmlreadersettings property?

  1. #1
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    How to change the xmlreadersettings property?

    I need to change/set the xmlreadersettings property to ignore so that I can import xml documents into Excel 2013.
    I have searched high and low and cannot find a vba solution.


    I have set a referece to Microsoft XML, v.6.0

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    I get a user defined type not defined error highlighting the red text.

    Does a VBA solution exist?

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: How to change the xmlreadersettings property?

    Please post the entirety of your code that looks like a combination of vb.net and c#, neither of which will work in vba.

  3. #3
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: How to change the xmlreadersettings property?

    Kyle,

    The code is VBNet. I am trying to find a VBA equivalent because the above code obviously doesn't work.

    Basically, I need to import XML files into either Access or Excel.
    I cannot import the XML files because of a 'DTD prohibited error'. I read that by changing the xmlreadersettings (OR Dtdprocessing settings?) to ignore this will fix the issue.

    My knowledge is not advanced enough to know how to achieve this.

    So, the code that I need is simply to change the settings to ignore. Should only be one line I presume, as above, obviously with the correct reference.

    Any ideas?

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: How to change the xmlreadersettings property?

    Could you post the code that you're using to import the xml, since you've got the reference ticked, I'm assuming that you're doing this through vba?

  5. #5
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: How to change the xmlreadersettings property?

    Yes I am importing the XML files through VBA, but obviously it doesn't work. Works without any problems in versions of Excel up to 2007.

    Please Login or Register  to view this content.
    First 3 lines of the XML files.
    Please Login or Register  to view this content.

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: How to change the xmlreadersettings property?

    You may have to parse them manually in that case then using the MSXML library.
    As an example:
    Please Login or Register  to view this content.
    Taken from: http://stackoverflow.com/questions/3...l-files-in-vb6

  7. #7
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: How to change the xmlreadersettings property?

    Thanks Kyle. Much appreciated.

    I will play around with it and see if I can get it to work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Worksheet Change - Unprotected Property
    By daffodil11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2013, 03:00 PM
  2. Change ControlSource property for ListBox with IF statement?
    By proepert in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2010, 05:54 PM
  3. Textbox property change
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2008, 07:05 PM
  4. 'On change' property
    By matpj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2006, 09:23 AM
  5. [SOLVED] Change insidewidth property
    By M Selvaraj in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-23-2006, 08:10 AM
  6. [SOLVED] Change property of comments only
    By Martin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2005, 12:05 PM
  7. how to use object variable to change the property of a
    By Fendic in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2005, 02:12 PM
  8. [SOLVED] Change number property for cell on another sheet
    By Qaspec in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2005, 11:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1