Skip to content

Commit 68def19

Browse files
committed
Added example.php
1 parent 64ac45c commit 68def19

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Aspose.Cells for PHP via Java consists of 2 individual parts, the script wrapper
4343
3. Copy aspose-cells-xx.x.jar and bcprov-jdk15on-xxx.jar to `lib` folder such as `\java\apache-tomcat-9.0.24\lib`.
4444
4. Run `\bin\startup.bat`, JavaBridge.war will be deployed to `\java\apache-tomcat-9.0.24\webapps\JavaBridge`.
4545
5. Test http://localhost:8080/JavaBridge/test.php to ensure that PHP works fine.
46-
6. Copy aspose.cells.php and examples.php to `\java\apache-tomcat-9.0.24\webapps\JavaBridge`.
47-
7. Open http://localhost:8080/JavaBridge/examples.php or create your own PHP file as follows.
46+
6. Copy aspose.cells.php and example.php to `\java\apache-tomcat-9.0.24\webapps\JavaBridge`.
47+
7. Open http://localhost:8080/JavaBridge/example.php or create your own PHP file as follows.
4848

4949

5050
### Sample Usage

example.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
4+
require_once("aspose.cells.php");
5+
6+
use aspose\cells;
7+
8+
$workbook = new cells\Workbook();
9+
$sheets = $workbook->getWorksheets();
10+
$cells = $sheets->get(0)->getCells();
11+
$cells->get("A1")->putValue("Hello world!");
12+
$workbook->save("output.xlsx", cells\SaveFormat::XLSX);
13+
14+
echo "Hello World!\n";
15+
16+
?>

0 commit comments

Comments
 (0)