Hi, both the manual & auto import doesn't work (i tried version 4.0.4 and 4.0.5).
This xlsx attachment works using 3.4.4.
Ticket #1251 recorded
Fixed !
In /model/Importable.php, replace line 431
require_once '../external/XLSXReader.php';
with
require_once '../external/XLSXReader/XLSXReader.php';
Will be intergrated in next patch (very soon)
Tq baby for the fix.
How about the auto cron-import?
Cronned auto-import uses same functionality, so it will also use the fix.
But to take into account new code, you must stop-restart the cron.
Version 4.0.6: cron import works but I got these:
2013-12-16 04:41:18 ** ERROR ** cause = rename(../files/importActivity_20131203_1647.xlsx,../files/importdoneActivity_20131203_1647.xlsx): The process cannot access the file because it is being used by another process. (code: 32)
I've tried on a Win8 (using Defender) & XP (w/o antivirus software), so shouldn't be the antivirus locking issue.
Thanks!
Hi,
File can be locked because of previous unsuccessfull import.
Try to move this file manually.
Then restart CRON and try another new import.
Tested using clean installs and the imports were successful (please see the attached log).
Maybe there is a XLS reader bug not closing the file?
Even unsuccessful import, the program should close the file & move it the ERROR folder (according to ProjeQtOr.ppt slide #116).
Even unsuccessful import, the program should close the file & move it the ERROR folder (according to ProjeQtOr.ppt slide #116).
Yes, but if the bug is the impossibility to move the file, this may be difficult.
Patched.
=== modified file external/XLSXReader/XLSXReader.php
--- external/XLSXReader/XLSXReader.php 2013-12-17 02:57:28 +0000
+++ external/XLSXReader/XLSXReader.php 2013-12-17 02:49:06 +0000
@@ -59,6 +59,10 @@
return $data;
}
}
+
+ public function closeDaFile(){
+ $this->zip->close();
+ }
// extract the shared string and the list of sheets
protected function parse() {
=== modified file model/Importable.php
--- model/Importable.php 2013-12-17 02:57:28 +0000
+++ model/Importable.php 2013-12-17 02:48:40 +0000
@@ -432,6 +432,7 @@
$xlsx = new XLSXReader($fileName);
$sheet1 = $xlsx->getSheet(1);
$data = $sheet1->getData();
+ $xlsx->closeDaFile();
return $data;
}
Great fix :woohoo:
Will be included in next version 😉
thanks for your contribution.