php读取mpp,How to generate MS Project (.mpp) file using PHP

原文:

I need to generate MS Project (.mpp) file using PHP, as I tried generating .xml but when oppening that files with MS Project, dates and durations are lost.

I tried creating a project with the MS Project itself and saving it as a .xml but it loses dates and durations too.

EDIT: Need to be MS Project 2013 friendly, so .mpx solutions like PHPProject offer do not help...

# Answer 1

4d350fd91e33782268f371d7edaa8a76.png

There's a Java-based project called MPXJ, which lets you create and manipulate Project files. You could either look at the source code and port it, or as a quick fix, just run it on the server and generate files on demand using a PHP/Java bridge (it's mentioned in the MPXJ documentation).

===

Edit: MPXJ doesn't write .mpp files.

According to the authors of MPXJ, the .mpp format is proprietary and there is no reliable way to generate the files. (See this answer - although it's from 2012, MPXJ still doesn't support writing MPP files, and the prediction about MPPX files hasn't yet come to pass.

The only way I can think of is to have a Windows server with Project installed that generates the files for you.

# Answer 2

There is a proprietary Aspose.Tasks product that can create/edit MS Project files(MPP, XML, etc.). You can use either Java/PHP Bridge to utilize Aspose.Tasks for Java on PHP(guide is here) or Aspose Cloud SDK for PHP

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值