6

I have a requirement to export to Microsoft Project from my company's program. As far as I've seen there are a few options:

  • Use one of the interchange formats, e.g. xml, mpx, mpd
  • Use the COM object model and automation to write the file
  • Buy a library that can write the files

The interchange formats have the problem that they will give you an import dialog when you open them, and if you want to save in a different format you need save as, and you need to select the file format before opening them. I.e. it's not a smooth experience for the customer.

Automation requires everyone who exports from our program to have MS Project installed, which is not acceptable.

The only library I could find was Aspose.Tasks which only writes into the Project XML format.

Does anyone know of any library that can write native mpp files? I've seen a post from Microsoft that they have no intention of documenting the file format, but there are some Project Viewers out there so someone must have done something with it? (Although reading from it can be done with an OleDB provider now that I think about it).

Anyone? Write MPP files?

BenV
  • 12,052
  • 13
  • 64
  • 92
Einar Egilsson
  • 3,438
  • 9
  • 36
  • 47

2 Answers2

0

The .NET Framework has the Microsoft.Office.Interop.MSProject set of classes. You could use them directly if your app is .NET, or write a dll in .NET and then reference that from your app.

BenV
  • 12,052
  • 13
  • 64
  • 92
  • 1
    Thanks for the answer, but those classes are for automation, (i.e. remote controlling the MS Project program itself) and I don't want to use that, having Microsoft Project itself installed is not an acceptable requirement. – Einar Egilsson Nov 05 '10 at 05:20
0

I have never had reason to import or export Project files in non-native format but for kicks I just created and exported a simple Project in .XML format. Sure enough, when I open that file using the user interface I have to decide if I want to:

a) open as a new file,
b) Append the data to the active project or
c) Merge the data into the active project.

But, if I open the file using a VBA statement:

FileOpenEx ("Project1.xml")

I'm not troubled by the multiple-choice exam. If the default option provided by FileOpenEx is appropriate you could concoct a very simple procedure to which you could direct your users. I'm not sure if this meets your need?

  • 1
    Apologies all - I just realized this question was posted a lifetime ago. Ah well, someone might stumble here with the same problem! – Malcolm Farrelle Sep 12 '19 at 09:22