+ Reply to Thread
Results 1 to 4 of 4

VBA - Copy XML code from excel worksheet and save to an XML file without delimiters

  1. #1
    Registered User
    Join Date
    05-06-2019
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    VBA - Copy XML code from excel worksheet and save to an XML file without delimiters

    Hi,

    I hope someone can help, I have run out of ideas :-)

    Thanks in anticipation.

    Problem:
    I am using VBA to automate a process of reading formatted xml code in Excel
    then copying the XML code from the worksheet to Notepad and saving it as an XML file.

    The VAB works fine, however the save "XML" has a double quote (") as a leading and trailing delimiter for each xml line plus where there are already quotes in the string, they are being doubled.

    Already attempted:
    I have tried to remove the extra double quotes for each string as I write it out, but that does not work properly.

    I have attached an example worksheet with the formatted xml and also the resulting notepad file.

    I need this automated but can't come up with a solution
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: VBA - Copy XML code from excel worksheet and save to an XML file without delimiters

    Try this to create the txt file:

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    05-06-2019
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    Re: VBA - Copy XML code from excel worksheet and save to an XML file without delimiters

    Thanks Bernie, I will let you know the outcome tomorrow evening. :-)

  4. #4
    Registered User
    Join Date
    05-06-2019
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    Re: VBA - Copy XML code from excel worksheet and save to an XML file without delimiters

    Hi Bernie,

    Just to let you know your solution worked perfectly.

    Thanks for your help :-)

+ 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. [SOLVED] VBA code to save current worksheet as temporary PDF file and then add to my existing code
    By brianfromla in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-20-2014, 08:35 AM
  2. VB Code to Save file as 97-2003 Worksheet
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-24-2014, 09:46 PM
  3. [SOLVED] VBA code to Save a Copy of a File
    By seethepuck in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2013, 05:25 PM
  4. [SOLVED] Save copy of each worksheet as a separate file
    By Sheepdog in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-14-2012, 01:26 AM
  5. [SOLVED] VBA Code to Save Copy File without Macro Button and VBA Code on Copy?
    By cychua in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-12-2012, 07:23 AM
  6. Save File as txt with " and ' delimiters
    By bryanbloom in forum Excel General
    Replies: 3
    Last Post: 03-19-2009, 09:02 PM
  7. saving an excel file as an ASCII text file without delimiters
    By Sewellst in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2005, 10:06 AM

Tags for this Thread

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