Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old August 5th 05, 08:16 AM
Sean
 
Posts: n/a
Default Excel updating from XML file - file path specific?

I'm having a littl edifficulty getting Excel to dynamically update from an
XML file. The XML file is generated from a program and I would like the Excel
file to dynamically update.
Problem is that the location of the XML and Excel file can change, that is
they can be anywhere on a hard drive but both are in the same directory. The
mapping of the XML file in Excel appears to be a complete file path
C:/data/report/.... but the location could change. They could be in
C:/data/report/run1 or run2, I don't want to have to re-map each time a
report is generated.

Ideally I would like to remove the directory specific path and use a
directory relative path. This way the XML file and XLS file can exist in any
directory and still update correctly.

Ofcourse, both files will be in the same directory when they are moved.

So my question is, can we change the path to teh XML file?

I'm using Excel 2003 (11.5612.5606) Office Pro.

  #2   Report Post  
Old August 5th 05, 08:27 AM
Norman Jones
 
Posts: n/a
Default

Hi Sean,

Try using:

ThisWorkbook.Path & Application.PathSeparator & "YourFileName"


---
Regards,
Norman



"Sean" wrote in message
...
I'm having a littl edifficulty getting Excel to dynamically update from an
XML file. The XML file is generated from a program and I would like the
Excel
file to dynamically update.
Problem is that the location of the XML and Excel file can change, that is
they can be anywhere on a hard drive but both are in the same directory.
The
mapping of the XML file in Excel appears to be a complete file path
C:/data/report/.... but the location could change. They could be in
C:/data/report/run1 or run2, I don't want to have to re-map each time a
report is generated.

Ideally I would like to remove the directory specific path and use a
directory relative path. This way the XML file and XLS file can exist in
any
directory and still update correctly.

Ofcourse, both files will be in the same directory when they are moved.

So my question is, can we change the path to teh XML file?

I'm using Excel 2003 (11.5612.5606) Office Pro.



  #3   Report Post  
Old August 5th 05, 08:41 AM
Sean
 
Posts: n/a
Default

Hi Norman,

Thanks for the reply, but will have to excuse my igorence.

Where, what and how?

Thanks in advance

Sean.

"Norman Jones" wrote:

Hi Sean,

Try using:

ThisWorkbook.Path & Application.PathSeparator & "YourFileName"


---
Regards,
Norman



"Sean" wrote in message
...
I'm having a littl edifficulty getting Excel to dynamically update from an
XML file. The XML file is generated from a program and I would like the
Excel
file to dynamically update.
Problem is that the location of the XML and Excel file can change, that is
they can be anywhere on a hard drive but both are in the same directory.
The
mapping of the XML file in Excel appears to be a complete file path
C:/data/report/.... but the location could change. They could be in
C:/data/report/run1 or run2, I don't want to have to re-map each time a
report is generated.

Ideally I would like to remove the directory specific path and use a
directory relative path. This way the XML file and XLS file can exist in
any
directory and still update correctly.

Ofcourse, both files will be in the same directory when they are moved.

So my question is, can we change the path to teh XML file?

I'm using Excel 2003 (11.5612.5606) Office Pro.




  #4   Report Post  
Old August 5th 05, 09:33 AM
Norman Jones
 
Posts: n/a
Default

Hi Sean,

How are you currently updating?



---
Regards,
Norman



"Sean" wrote in message
...
Hi Norman,

Thanks for the reply, but will have to excuse my igorence.

Where, what and how?

Thanks in advance

Sean.

"Norman Jones" wrote:

Hi Sean,

Try using:

ThisWorkbook.Path & Application.PathSeparator & "YourFileName"


---
Regards,
Norman



"Sean" wrote in message
...
I'm having a littl edifficulty getting Excel to dynamically update from
an
XML file. The XML file is generated from a program and I would like the
Excel
file to dynamically update.
Problem is that the location of the XML and Excel file can change, that
is
they can be anywhere on a hard drive but both are in the same
directory.
The
mapping of the XML file in Excel appears to be a complete file path
C:/data/report/.... but the location could change. They could be in
C:/data/report/run1 or run2, I don't want to have to re-map each time a
report is generated.

Ideally I would like to remove the directory specific path and use a
directory relative path. This way the XML file and XLS file can exist
in
any
directory and still update correctly.

Ofcourse, both files will be in the same directory when they are moved.

So my question is, can we change the path to teh XML file?

I'm using Excel 2003 (11.5612.5606) Office Pro.






  #5   Report Post  
Old August 5th 05, 12:56 PM
Sean
 
Posts: n/a
Default

Hi Norman,

Currently using XML maps through the Data XML XML Source or Import
functions.

This gives me columns for each XML "field". Bit like importing a .CSV file I
guess.

If I move both my .XML and .XLS file to a new location (remove from old) and
try to Data XML Refresh XML Data I get and error saying cant find
source or something like that.

Cheers,

Sean.

"Norman Jones" wrote:

Hi Sean,

How are you currently updating?



---
Regards,
Norman



"Sean" wrote in message
...
Hi Norman,

Thanks for the reply, but will have to excuse my igorence.

Where, what and how?

Thanks in advance

Sean.

"Norman Jones" wrote:

Hi Sean,

Try using:

ThisWorkbook.Path & Application.PathSeparator & "YourFileName"


---
Regards,
Norman



"Sean" wrote in message
...
I'm having a littl edifficulty getting Excel to dynamically update from
an
XML file. The XML file is generated from a program and I would like the
Excel
file to dynamically update.
Problem is that the location of the XML and Excel file can change, that
is
they can be anywhere on a hard drive but both are in the same
directory.
The
mapping of the XML file in Excel appears to be a complete file path
C:/data/report/.... but the location could change. They could be in
C:/data/report/run1 or run2, I don't want to have to re-map each time a
report is generated.

Ideally I would like to remove the directory specific path and use a
directory relative path. This way the XML file and XLS file can exist
in
any
directory and still update correctly.

Ofcourse, both files will be in the same directory when they are moved.

So my question is, can we change the path to teh XML file?

I'm using Excel 2003 (11.5612.5606) Office Pro.








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Putting Excel formatting and/or formulas into CSV file Frank D. Nicodem, Jr. Excel Discussion (Misc queries) 1 July 11th 05 10:18 PM
Changing the format of an Excel output file made by Microsoft Access Amir Excel Discussion (Misc queries) 2 May 1st 05 12:57 AM
Opening an Excel file Sheldon Zaklow Excel Discussion (Misc queries) 0 March 3rd 05 10:29 PM
How do I insert the directory path in my Excel file? Insert a Directory Path in Header/Footer Excel Worksheet Functions 2 February 4th 05 09:23 PM
Hyperlink to specific sheet in Excel Web File jd17 Links and Linking in Excel 0 December 8th 04 09:03 PM


All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017