|
@@ -1,34 +1,32 @@
|
|
|
-import * as XLSX from "xlsx";
|
|
|
import { round, toDegrees } from "./";
|
|
|
import { saveAs } from "./file-serve";
|
|
|
-import { sendFetch } from "@/request";
|
|
|
import * as URL from "@/request/URL";
|
|
|
import { basePath, gHeaders } from "@/request/state";
|
|
|
|
|
|
-const genXLSLByTemp = (data: ArrayBuffer, tabs: any[][], name: string) => {
|
|
|
- const workbook = XLSX.read(data, {
|
|
|
- type: "binary",
|
|
|
- cellStyles: true,
|
|
|
+// const genXLSLByTemp = (data: ArrayBuffer, tabs: any[][], name: string) => {
|
|
|
+// const workbook = XLSX.read(data, {
|
|
|
+// type: "binary",
|
|
|
+// cellStyles: true,
|
|
|
|
|
|
- cellNF: true,
|
|
|
- cellDates: true,
|
|
|
- sheetStubs: true,
|
|
|
- raw: true,
|
|
|
- bookDeps: true,
|
|
|
- bookVBA: true,
|
|
|
- // bookProps: true,
|
|
|
- // bookSheets: true,
|
|
|
- WTF: true,
|
|
|
- PRN: true,
|
|
|
- xlfn: true,
|
|
|
- });
|
|
|
- const sheetName = workbook.SheetNames[0];
|
|
|
- const worksheet = workbook.Sheets[sheetName];
|
|
|
+// cellNF: true,
|
|
|
+// cellDates: true,
|
|
|
+// sheetStubs: true,
|
|
|
+// raw: true,
|
|
|
+// bookDeps: true,
|
|
|
+// bookVBA: true,
|
|
|
+// // bookProps: true,
|
|
|
+// // bookSheets: true,
|
|
|
+// WTF: true,
|
|
|
+// PRN: true,
|
|
|
+// xlfn: true,
|
|
|
+// });
|
|
|
+// const sheetName = workbook.SheetNames[0];
|
|
|
+// const worksheet = workbook.Sheets[sheetName];
|
|
|
|
|
|
- XLSX.utils.sheet_add_aoa(worksheet, tabs, { origin: "A2" });
|
|
|
- const wbout = XLSX.writeFile(workbook, `${name}.xlsx`);
|
|
|
- return saveAs(wbout, `${name}.xlsx`);
|
|
|
-};
|
|
|
+// XLSX.utils.sheet_add_aoa(worksheet, tabs, { origin: "A2" });
|
|
|
+// const wbout = XLSX.writeFile(workbook, `${name}.xlsx`);
|
|
|
+// return saveAs(wbout, `${name}.xlsx`);
|
|
|
+// };
|
|
|
|
|
|
export const downloadPointsXLSL1 = async (
|
|
|
points: number[][],
|