style: lint
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 3m58s

This commit is contained in:
Mihajlo Medjedovic 2024-08-12 10:33:54 +02:00
parent 6547461637
commit 20c3a338c5
5 changed files with 20 additions and 18 deletions

View File

@ -12,7 +12,7 @@ export interface ParseParams {
* If workbook is provided, parse function will not run a XLSX.read()
* it will use this property instead. So the client must do a file read beforehand
*/
workbook?: XLSX.WorkBook,
workbook?: XLSX.WorkBook
/**
* Parse function will manipulate and return the uploader array which can be provided with files already in the queue
* Otherwise new empty instance will be created.

View File

@ -10,4 +10,4 @@ export default interface FoundRangeInfo {
export interface MissingHeaders {
sheetName: string
missingHeaders: string[]
}
}

View File

@ -1,13 +1,13 @@
import { MissingHeaders } from "./RangeInfo"
import { MissingHeaders } from './RangeInfo'
export interface SearchDataExcelResult {
missing?: MissingHeaders[],
missing?: MissingHeaders[]
found?: {
data: any,
arrayData: any[],
data: any
arrayData: any[]
sheetName: string
headers: string[]
startAddress?: string
endAddress?: string
}
}
}

View File

@ -219,10 +219,12 @@ export class MultiDatasetComponent implements OnInit {
if (this.selectedFile) {
this.fileLoadingState = FileLoadingState.reading
this.selectedFile.sizeMB = this.spreadsheetService.bytesToMB(this.selectedFile.size)
this.selectedFile.sizeMB = this.spreadsheetService.bytesToMB(
this.selectedFile.size
)
// Read the excel file to be ready
this.spreadsheetService.xlsxReadFile(this.selectedFile!).then(wb => {
this.spreadsheetService.xlsxReadFile(this.selectedFile!).then((wb) => {
this.fileLoadingState = FileLoadingState.parsing
this.selectedFile!.workbook = wb
})
@ -314,7 +316,7 @@ export class MultiDatasetComponent implements OnInit {
})
})
this.workbookLoaded().then(workbook => {
this.workbookLoaded().then((workbook) => {
for (let parsedDataset of this.parsedDatasets) {
this.spreadsheetService
.parseExcelFile({

View File

@ -55,14 +55,14 @@ export class SpreadsheetService {
let reader: FileReader = new FileReader()
reader.onload = (fileReaderResponse: any) => {
spreadSheetUtil.xslxStartReading(
fileReaderResponse,
this.promptExcelPassword
).then(response => {
resolve(response)
}).catch(err => {
reject(err)
})
spreadSheetUtil
.xslxStartReading(fileReaderResponse, this.promptExcelPassword)
.then((response) => {
resolve(response)
})
.catch((err) => {
reject(err)
})
}
reader.readAsArrayBuffer(file)