Hello,
I want to know how to use the FileSaveAs or FileOpen method to export data from an Excel Sheet to MS Project using a mapping.
Thank you in advance.
Hello,
I want to know how to use the FileSaveAs or FileOpen method to export data from an Excel Sheet to MS Project using a mapping.
Thank you in advance.
Last edited by aelmalki; 23-10-2009 at 02:53 PM.
It is simple. You can just go to File and click on Save As and from there choose the Excel Workbook format. You can find that from the drop down box of Save As dialog box. Just hit on save and that's all. After that the file will not be created instantly. The export wizard will appear and you will have to follow some simple steps to get the final file. I am sure it will help you and work quiet properly. The wizard will guide you in proper manner to export all the contents that you are looking for.
But I want to know how can I do this import with a VBA macro, im sorry I forget to specify in my post.
Concerning my case, the question is about how to export sheet's Excel to MS Project executing an Excel VBA Macro (from Excel).
The VBA code generated by using your solution in MS Project:
I adapted this code in VBA Excel :Code:FileOpen Name:="C:\Export 20091023 1033.xls", ReadOnly:=False, Merge:=0, FormatID:="MSProject.XLS5", map:="Map1"
But i have an error.Code:Set MSP = CreateObject("MSProject.Application") MSP.FileOpen Name:="C:\Export 20091023 1033.xls", FormatID:="MSProject.mpp.9", map:="Mappage_Listes_Tâches2"
Do you have any idea???
Thanks and best regards.
I will recommend you to go with the manual process and I think it will really work. It will allow you to create a map that works in proper format. You can start by creating a macro first and then renaming the map. You can find a vba code based on the same on web easily. Because there are no major process involved. Also you can try to find some references led to Microsoft Project object library in excel which works really well.
It appears as though the other folks who have posted code have created a custom Import map in Microsoft project and simply call to that import map in their code.
You can turn on the macro recorder in project and record the creation of the map or create the map before and call to the map in the code.
Julie
I think that is going to work well. But I am not sure about the same. I am going to provide a set of options that are mentioned above and will notify that whether it really works or not. There can be chances to get errors. I was expecting for a more detailed information on the same. I thought there will be some easy to use tool that will really work and provide the stuff that I am looking for. What are the more things that I can try out here.
Great. Glad to hear you were able to work it out.
JulieS,
I need some help here to begin with a code that can allow me to automatically add a Project Object Library. Are you aware about the GUID which is available for Microsoft Project 2003. I am not able to find any information on the same. I think this is possible but would require more analysis on the step how it is going to work. Is there any other people available that has option to create or to add reference library through a manual process.
Sorry, no. Are you looking for the location of the Project 2003 object library? The best I can recommend is to look at the path in an installation of MS Project and include the full path to the OLB file.
I can find out some path at the bottom of reference library. I think something can be managed from there and it might work. I had went inside VBE tools and then clicked on references and hope it will be working well by clicking on Project Object Library. Can anyone put a more highlight on the same. I am also trying to find out some tools that can automate the process of exporting project files to excel. There are chances but it will be complicated.
You've run through my knowledge of VBA coding and then some. I suggest posting to the Microsoft Project Programming forum on TechNet.
Best,
Julie
Bookmarks