background
The front-end obtains the data and generates a csv file through the xlsx library. The file is opened in excel and the long number is displayed in scientific notation, and the time is not displayed in full, but the second is not displayed. Unless the time of the cell is selected, the congruent problem will be displayed.
How to solve
bookType is set to csv but the file suffix is set to excel
The problem is that when the file is opened with excel, it will prompt the file format question and ask whether to continue to open it.XLSX.writeFile(wb, `发送日志-${moment().format('YYYY-MM-DD')}.xlsx`, { type: 'binary', bookType: 'csv' });
Add additional characters to display problematic fields
{ 发送时间: moment(sendTime).format('YYYY-MM-DD HH:mm:ss') + '\t', userId: userId + '\t' }
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。