+ Reply to Thread
Results 1 to 2 of 2

Weird behavior with mapping of XML RSS feeds

  1. #1
    Registered User
    Join Date
    07-15-2020
    Location
    New York, United States
    MS-Off Ver
    Newest?
    Posts
    2

    Weird behavior with mapping of XML RSS feeds

    I'm trying to collect data on news articles for a research project. To do that I am connecting an excel document to a bunch of rss feeds and having it append the data every two minutes after which I remove all duplicates from the xml table, just leaving me with the original articles and any new ones since the code last ran. I figured out the VBA necessary for this and it is working for the most part.

    The problem is that some of the RSS sources aren't mapping correctly. Instead of lining up all of the data like this:
    Screenshot (159).png

    Excel is giving each individual piece of data its own line and seperating it from the data it corresponds with. This is an example of one of those sources:
    Screenshot (160).png

    If I deselect automatically merge when mapping, it formats correctly but then each column is its own xml table and my duplication removal solution no longer works. This is the code for that:
    Option Explicit
    Public nSaveWB As Date
    Public rSelection As Range
    Public Const cRunWhat = "SaveWB"
    Public Sub SetSaveWBTimer()
    nSaveWB = Now + TimeSerial(0, 2, 0) ' 2 Minute
    Application.OnTime EarliestTime:=nSaveWB, Procedure:=cRunWhat, _
    Schedule:=True
    End Sub
    Public Sub SaveWB()
    ActiveWorkbook.RefreshAll
    RemoveDP
    SetSaveWBTimer
    End Sub
    Public Sub RemoveDP()
    Set rSelection = Sheet1.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=Array(1)
    Set rSelection = Sheet2.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=(1, 2, 3)
    Set rSelection = Sheet3.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=Array(1, 2)
    Set rSelection = Sheet4.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=Array(1, 2, 3)
    Set rSelection = Sheet6.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=Array(1, 2, 3)
    Set rSelection = Sheet5.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=Array(1, 2, 3)
    Set rSelection = Sheet7.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=Array(1, 2, 3)
    Set rSelection = Sheet8.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=Array(1, 2, 3)
    Set rSelection = Sheet9.Range("A1").CurrentRegion
    rSelection.RemoveDuplicates Columns:=Array(1, 2, 3)
    End Sub



    I need to fix this because the blank spaces that excel is adding make me delete duplicate titles without their corresponding times and it ends up creating data tables like this, which would require an extra layer of data cleaning and work on my end before it would be usable:
    Screenshot (161).png

    I've been unable to figure out a solution to this problem, and some help would be appreciated.

  2. #2
    Registered User
    Join Date
    07-15-2020
    Location
    New York, United States
    MS-Off Ver
    Newest?
    Posts
    2

    Re: Weird behavior with mapping of XML RSS feeds

    Bump, I need 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] Weird Excel behavior
    By MB421 in forum Excel General
    Replies: 5
    Last Post: 05-26-2013, 10:29 PM
  2. Weird behavior on Transfertext with VBA
    By matelot09 in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2012, 11:42 AM
  3. Weird sort behavior
    By mfactor in forum Excel General
    Replies: 4
    Last Post: 11-21-2009, 01:12 PM
  4. OptionButton weird behavior
    By dpenny in forum Excel General
    Replies: 2
    Last Post: 04-16-2007, 08:06 PM
  5. [SOLVED] Excel weird behavior
    By [email protected] in forum Excel General
    Replies: 4
    Last Post: 05-25-2006, 03:30 PM
  6. [SOLVED] Weird clipboard behavior
    By Josh Sale in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-06-2005, 06:05 PM
  7. Weird Sorting Behavior
    By Jim Thomlinson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2005, 12:06 AM
  8. [SOLVED] Weird behavior of VLOOKUP
    By John Simons in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2005, 10:07 PM

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