locked
Relative path to file data source RRS feed

  • Question

  • Hi all,

    I have the following issue. I would like to make my PowerPivot xlsx file portable (e.g. downloadable) and maintain a Flat File data source. The intended scenario is that the user could then keep his xlsx file, download a CSV feed and refresh the data locally.

    In order to do this, I would like the PowerPivot to use as a source a .txt file in the same folder as the xlsx file (say, with a predefined file name "import.txt").

    Usually, of course, the data source connections to text files instead store an absolute path, and then never work when the file is copied to a different folder on another computer. Is there any way to go around this and specify a path relative to the xlsx file? Or is there some good reason why this is not a good idea?

    Would appreciate any comments,

    Jurgis

    Friday, October 15, 2010 3:02 PM

Answers

  • 1. place the files in C:\ root
    2. or teach the users to open powerpivot window and update the connections via "design>existing connections>edit" button!?

    sorry, no better solution at moment :)

    Friday, October 15, 2010 3:50 PM

All replies

  • 1. place the files in C:\ root
    2. or teach the users to open powerpivot window and update the connections via "design>existing connections>edit" button!?

    sorry, no better solution at moment :)

    Friday, October 15, 2010 3:50 PM
  • I see. Too bad, these are exactly the options I want to avoid.

    I wonder, would it be possible to set the connections via some kind of macro? Or excel macros don't have access to Powerpivot stuff?

    Friday, October 15, 2010 3:59 PM
  • placing the CSV file on a network share is also no option?
    Regarding Macros: No chance with V1

    you could try to open the xlsx file (rename to zip and open). maybe you have look and can change the path in one of the xml files inside the zip?_>dirty hack

    Friday, October 15, 2010 5:07 PM
  • I guess I'll just have to stick with the storing files in C:\ solution. Any chance there'll be a better way in next version?
    Friday, October 15, 2010 5:30 PM
  • hm your portable solution package should also include the ODC file!? xslx + Csv + odc
    Can you create a ODC file with excel and define a relative path? After that go powerpivot "open existing connection" and choose the ODC-file

    Friday, October 15, 2010 5:55 PM
  • I'm not sure I understand your suggestion. What is the advantage of including the ODC file? Powerpivot normally stores ODC connections inside xlsx, so it doesn't look likely that external ODC file would help to point to a relative path?

    Even if ODC can point to a relative path, how could I tell the Powerpivot table to use that specific ODC file (which would itself now be on a relative path to xlsx)? You can not even change which of the existing connections a given table should use - it's fixed after you create the table.

    Thursday, October 21, 2010 10:36 AM
  • If your idea is to share a copy, can you create the structure under c:\temp both for the xls and the mdb and then zip both items preserving path ans send to the sharee? When he unzips it creates the necessary path and usage should be seamless. He only has to know the path.

    Just a thought, haven't tested.

    Monday, May 19, 2014 4:33 PM
  • Hello,

    I am looking for the same thing, could you please tell me if it was possible for you to work with relative path in power Pivot ? (Actualy i am wondering also if it is possible to do it in Power Quesry ?!)

    Thanks in advance :)

    Friday, May 22, 2015 1:18 PM