SbloodyS commented on code in PR #17283:
URL: 
https://github.com/apache/dolphinscheduler/pull/17283#discussion_r2167935222


##########
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-email/src/main/java/org/apache/dolphinscheduler/plugin/alert/email/ExcelUtils.java:
##########
@@ -102,13 +102,15 @@ public static void genExcelFile(String content, String 
title, String xlsFilePath
                 // setting excel body height
                 row.setHeight((short) 500);
                 rowIndex++;
+                int colIndex = 0;
                 for (int j = 0; j < values.length; j++) {
-                    Cell cell1 = row.createCell(j);
-                    cell1.setCellStyle(cellStyle);
                     if (values[j] instanceof Number) {
+                        Cell cell1 = row.createCell(j);
+                        cell1.setCellStyle(cellStyle);
                         
cell1.setCellValue(Double.parseDouble(String.valueOf(values[j])));
+                        colIndex++;
                     } else {
-                        cell1.setCellValue(String.valueOf(values[j]));
+                        colIndex = setCellValueWithSplit(row, colIndex, 
cellStyle, values[j]);

Review Comment:
   Please add some unit test for this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to