When the data displayed by ALV contains double quotation marks, it is okay to display it in ALV. However, when it is output to excel, the problem may occur. After analysis, it is found that this problem is not Alv, but the problem of opening the output text file in Excel, that is, Excel.
The following rules are found through tests:
Assume that the output data is Liu jincai, Zhu Jia, and Si Lilong.
ALV |
Excel |
Liu jincai |
Zhu Jia |
Si Lilong |
Liu jincai |
Zhu Jia |
Si Lilong |
"Liu jincai |
Zhu Jia |
Si Lilong |
Liu jincai, Zhu Jia, Si Lilong, a classmate |
"Liu jincai" |
Zhu Jia |
Si Lilong |
Liu jincai |
Zhu Jia |
Si Lilong |
"Liu Jin" is the same as "Learning |
Zhu Jia |
Si Lilong |
Liu jincai and "Xue" |
Zhu Jia |
Si Lilong |
"Liu jincai |
Zhu Jia |
Si Lilong "Students |
Liu jincai, Zhu Jia, Si Lilong, a classmate |
"Liu jincai |
Zhu Jia |
"Si Lilong |
Liu jincai, Zhu Jia, Si Lilong, a classmate |
"Liu Jin" is the same as "Learning |
"Zhu Jia |
Si Lilong |
Liu jincai and "Xue" |
Si Lilong, Zhu Jia |
Liu jincai "Students |
Zhu Jia |
Si Li "long fellow |
Liu jincai and "Xue" |
Zhu Jia |
Si Li "long fellow |
Liu jincai "Students |
Zhu Jia |
Si Lilong |
Liu jincai and "Xue" |
Zhu Jia |
Si Lilong |
Conclusion:
If "," appears in the middle of the field, it will be processed as normal characters.
When "is displayed at the beginning of a field, it will search for" (This "can be found only in the field and does not have to appear at the beginning of the field, link all the fields with "fields starting from the beginning until then" to a field.
If you want to avoid this problem, you can consider "converting to full-width" at the beginning ".
In addition, make sure that the field type specified during the output is consistent with the system type. Otherwise, a short dump occurs when the Excel file is output. Incorrect,