在PHP中打开文件

Aspose.Cells - 打开Excel文件

通过路径打开

通过引用文件路径简单地打开Microsoft Excel文件

PHP 代码

         $dataDir = '';

        // Create Aspose.Cells Helper Object

        $ptr = new \COM('Aspose.Cells.Interop.InteropHelper');

        // Opening through Path

        // Creating a Workbook object and opening an Excel file using its file path

        $workbook = $ptr->New("Aspose.Cells.Workbook",array($dataDir . '/Book1.xls'));

        $worksheets = $ptr->Get($workbook,"Worksheets",array());

下载运行代码

从以下任一社交编码网站下载打开文件(Aspose.Cells)