aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Trips.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-02-26 10:47:26 +0500
committerAbyss777 <abyss@fox5.ru>2017-02-26 10:47:26 +0500
commit7da2247e40f23a2a423f794e356436f227b60de9 (patch)
tree5e6ac3a6ec66f016e2b39733a35e8a1dba748890 /src/org/traccar/reports/Trips.java
parent3302d7cf5e7d776da723b811f7daf7a7bd24bb25 (diff)
downloadtrackermap-server-7da2247e40f23a2a423f794e356436f227b60de9.tar.gz
trackermap-server-7da2247e40f23a2a423f794e356436f227b60de9.tar.bz2
trackermap-server-7da2247e40f23a2a423f794e356436f227b60de9.zip
Safely name sheets for excel reports
Diffstat (limited to 'src/org/traccar/reports/Trips.java')
-rw-r--r--src/org/traccar/reports/Trips.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/reports/Trips.java b/src/org/traccar/reports/Trips.java
index a52d48f16..45b52b63c 100644
--- a/src/org/traccar/reports/Trips.java
+++ b/src/org/traccar/reports/Trips.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;
@@ -201,7 +202,7 @@ public final class Trips {
DeviceReport deviceTrips = new DeviceReport();
Device device = Context.getIdentityManager().getDeviceById(deviceId);
deviceTrips.setDeviceName(device.getName());
- sheetNames.add(deviceTrips.getDeviceName());
+ sheetNames.add(WorkbookUtil.createSafeSheetName(deviceTrips.getDeviceName()));
if (device.getGroupId() != 0) {
Group group = Context.getDeviceManager().getGroupById(device.getGroupId());
if (group != null) {