WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Data import problem

 
   Home -> Office -> Data Map RSS
Next:  Problems with Excel 2003 Toolbar  
Author Message
Sara S

External


Since: Aug 29, 2007
Posts: 2



(Msg. 1) Posted: Wed Aug 29, 2007 11:54 am
Post subject: Data import problem
Archived from groups: microsoft>public>excel>datamap (more info?)

I am trying to import the following data from a web query:

<?xml version="1.0"?>
<NewDataSet>
<Body>
<Participant>SARAS</Participant>
<QueryResponse xmlns="http://xxxx.xxx/xml">
<ScheduleOfferSet>
<ScheduleOffer location="3205101" schedule="1" day="20070822"
slope="false">
<OfferSegment MW="50" price="200.8" />
</ScheduleOffer>
</ScheduleOfferSet>
</QueryResponse>
</Body>
</NewDataSet>

Since I would like to be able to auto refresh this query when I change a
parameter elsewhere in the workbook, I do not import it as XML (for some
reason you cannot have excel auto refresh the query if you import it as XML).
However, when I do, the "OfferSegment" tag does not show up in the resulting
dataset.
You can see this by saving the above code into an .xml file and try to
import it, bypassing the option to import as XML (that works just fine).
So I have two questions:
1. How do I get the OfferSegment tag to show up in the xl sheet and
2. Failing that, how can I get Excel to handle a web query that requires it
to format the data into XML AND auto refresh when a cell changes values.
Thanks,
Sara
Sara S
Back to top
Login to vote
ShaneDevenshire

External


Since: May 19, 2006
Posts: 2098



(Msg. 2) Posted: Thu Sep 27, 2007 4:19 pm
Post subject: RE: Data import problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

I haven't worked with XML files but assuming you can refresh manually using
the standard refresh button, you should be able to refresh the data by
writing a VBA routine.

Example:

Private Sub Worksheet_Change(ByVal Target As Range)
Set isect = Application.Intersect(Range("xml"), Range(Target))
If Not isect Is Nothing Then
'"add the recorded refresh method here"
End If
End Sub

As you see I haven't added the code for refreshing an XLM file, but
hopefully you can record it.
--
Cheers,
Shane Devenshire


"Sara S" wrote:

> I am trying to import the following data from a web query:
>
> <?xml version="1.0"?>
> <NewDataSet>
> <Body>
> <Participant>SARAS</Participant>
> <QueryResponse xmlns="http://xxxx.xxx/xml">
> <ScheduleOfferSet>
> <ScheduleOffer location="3205101" schedule="1" day="20070822"
> slope="false">
> <OfferSegment MW="50" price="200.8" />
> </ScheduleOffer>
> </ScheduleOfferSet>
> </QueryResponse>
> </Body>
> </NewDataSet>
>
> Since I would like to be able to auto refresh this query when I change a
> parameter elsewhere in the workbook, I do not import it as XML (for some
> reason you cannot have excel auto refresh the query if you import it as XML).
> However, when I do, the "OfferSegment" tag does not show up in the resulting
> dataset.
> You can see this by saving the above code into an .xml file and try to
> import it, bypassing the option to import as XML (that works just fine).
> So I have two questions:
> 1. How do I get the OfferSegment tag to show up in the xl sheet and
> 2. Failing that, how can I get Excel to handle a web query that requires it
> to format the data into XML AND auto refresh when a cell changes values.
> Thanks,
> Sara
> Sara S
>
Back to top
Login to vote
ShaneDevenshire

External


Since: May 19, 2006
Posts: 2098



(Msg. 3) Posted: Thu Sep 27, 2007 4:21 pm
Post subject: RE: Data import problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I should add that the code must be put in the Sheet object for the sheet
where you data is. Press Alt F11 then find the sheet on the left hand side
of the VBE and double click it. Place the code in the sheet that opens up on
the right side.
--
Thanks,
Shane Devenshire


"Sara S" wrote:

> I am trying to import the following data from a web query:
>
> <?xml version="1.0"?>
> <NewDataSet>
> <Body>
> <Participant>SARAS</Participant>
> <QueryResponse xmlns="http://xxxx.xxx/xml">
> <ScheduleOfferSet>
> <ScheduleOffer location="3205101" schedule="1" day="20070822"
> slope="false">
> <OfferSegment MW="50" price="200.8" />
> </ScheduleOffer>
> </ScheduleOfferSet>
> </QueryResponse>
> </Body>
> </NewDataSet>
>
> Since I would like to be able to auto refresh this query when I change a
> parameter elsewhere in the workbook, I do not import it as XML (for some
> reason you cannot have excel auto refresh the query if you import it as XML).
> However, when I do, the "OfferSegment" tag does not show up in the resulting
> dataset.
> You can see this by saving the above code into an .xml file and try to
> import it, bypassing the option to import as XML (that works just fine).
> So I have two questions:
> 1. How do I get the OfferSegment tag to show up in the xl sheet and
> 2. Failing that, how can I get Excel to handle a web query that requires it
> to format the data into XML AND auto refresh when a cell changes values.
> Thanks,
> Sara
> Sara S
>
Back to top
Login to vote
Sara S

External


Since: Aug 29, 2007
Posts: 2



(Msg. 4) Posted: Fri Sep 28, 2007 2:37 am
Post subject: RE: Data import problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks, but since I will be distributing this among our company, I wanted to
get away with any local vba. I wanted to have excel refresh this query in the
same way that it refreshes non xml formatted web queries - automatically.
Back to top
Login to vote
ShaneDevenshire

External


Since: May 19, 2006
Posts: 2098



(Msg. 5) Posted: Fri Sep 28, 2007 9:36 pm
Post subject: RE: Data import problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sara,

There may be a way but I just don't work with XML sorry I can't help.
--
Thanks,
Shane Devenshire


"Sara S" wrote:

> Thanks, but since I will be distributing this among our company, I wanted to
> get away with any local vba. I wanted to have excel refresh this query in the
> same way that it refreshes non xml formatted web queries - automatically.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Data Map All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support