|
|
|
@ -102,10 +102,7 @@ object ExcelUtils {
|
|
|
|
|
"气体浓度_${PathUtils.getNowTimeFormat(PathUtils.DATE_TO_STRING_LONG_PATTERN)}.xls"
|
|
|
|
|
else "告警数据_${PathUtils.getNowTimeFormat(PathUtils.DATE_TO_STRING_LONG_PATTERN)}.xls"
|
|
|
|
|
val filePath =
|
|
|
|
|
PathUtils.getExternalStoragePath(context) + PathUtils.EXCEL_EXPORT_PATH + fileName
|
|
|
|
|
deleteExistFile(PathUtils.getExternalStoragePath(context) + PathUtils.EXCEL_EXPORT_PATH)
|
|
|
|
|
makeDir(File(PathUtils.getExternalStoragePath(context) + PathUtils.EXCEL_EXPORT_PATH))
|
|
|
|
|
|
|
|
|
|
PathUtils.getExternalStoragePath(context) + File.separator + fileName
|
|
|
|
|
val columns = context.resources.getStringArray(R.array.excel_column);
|
|
|
|
|
initExcel(columns, filePath, PathUtils.SHEET_NAME) //需要写入权限
|
|
|
|
|
|
|
|
|
|