wr: 빗물사용시설 excel 천단위 처리
This commit is contained in:
@@ -2,11 +2,14 @@ import { lwCds, type comCodeState } from "@/app/store/common/code";
|
||||
import {
|
||||
filePickedBlob,
|
||||
filePickedBlobArray,
|
||||
filePickedBlobArrayFormat,
|
||||
filePickedBlobNumStyle,
|
||||
type ReturnType,
|
||||
type SelectDataType,
|
||||
type SheetParameter,
|
||||
} from "@common/business_components/ui";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { write } from "fs";
|
||||
import moment from "moment";
|
||||
import type { RefObject } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
@@ -100,6 +103,26 @@ export const excelDownload = (
|
||||
});
|
||||
};
|
||||
|
||||
export const excelDownloadStyle = (
|
||||
// excelList: [][],
|
||||
fileNm: string,
|
||||
sampleFile: string,
|
||||
sheetArray: SheetParameter[]
|
||||
) => {
|
||||
// if (excelList.length === 0) return;
|
||||
fetch(`/${sampleFile}`, {}).then(async (response) => {
|
||||
if (!response.ok) {
|
||||
throw Error(response.statusText);
|
||||
}
|
||||
// 받은 파일 바인너리 처리
|
||||
const blobRet = await response.arrayBuffer();
|
||||
// 버퍼에 있는 엑셀데이터 전달 후 json으로 변환
|
||||
// await filePickedBlob(blobRet, excelList, fileNm, writeLine, headerRange);
|
||||
|
||||
await filePickedBlobNumStyle(blobRet, fileNm, sheetArray);
|
||||
});
|
||||
};
|
||||
|
||||
export const excelArrayDownload = (
|
||||
fileNm: string,
|
||||
sampleFile: string,
|
||||
|
||||
Reference in New Issue
Block a user