aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Route.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-26 23:22:00 +1300
committerGitHub <noreply@github.com>2017-02-26 23:22:00 +1300
commit1858afe0af539e7892bd7a48c2fa2aa7f43f968a (patch)
tree5e6ac3a6ec66f016e2b39733a35e8a1dba748890 /src/org/traccar/reports/Route.java
parent3302d7cf5e7d776da723b811f7daf7a7bd24bb25 (diff)
parent7da2247e40f23a2a423f794e356436f227b60de9 (diff)
downloadtrackermap-server-1858afe0af539e7892bd7a48c2fa2aa7f43f968a.tar.gz
trackermap-server-1858afe0af539e7892bd7a48c2fa2aa7f43f968a.tar.bz2
trackermap-server-1858afe0af539e7892bd7a48c2fa2aa7f43f968a.zip
Merge pull request #2958 from Abyss777/fix_2955
Safely name sheets for excel reports
Diffstat (limited to 'src/org/traccar/reports/Route.java')
-rw-r--r--src/org/traccar/reports/Route.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/reports/Route.java b/src/org/traccar/reports/Route.java
index 468771a48..c1acaf322 100644
--- a/src/org/traccar/reports/Route.java
+++ b/src/org/traccar/reports/Route.java
@@ -26,6 +26,7 @@ import java.util.Collection;
import java.util.Date;
import java.util.List;
+import org.apache.poi.ss.util.WorkbookUtil;
import org.joda.time.DateTime;
import org.jxls.area.Area;
import org.jxls.builder.xls.XlsCommentAreaBuilder;
@@ -67,7 +68,7 @@ public final class Route {
DeviceReport deviceRoutes = new DeviceReport();
Device device = Context.getIdentityManager().getDeviceById(deviceId);
deviceRoutes.setDeviceName(device.getName());
- sheetNames.add(deviceRoutes.getDeviceName());
+ sheetNames.add(WorkbookUtil.createSafeSheetName(deviceRoutes.getDeviceName()));
if (device.getGroupId() != 0) {
Group group = Context.getDeviceManager().getGroupById(device.getGroupId());
if (group != null) {