- Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
fixedThe issue has been correctedThe issue has been corrected
Description
Describe the bug
I have data stored in a subdirectory of AppData e.g., C:\Users\user\AppData\Roaming\project\data.csv that I cannot load normally.
This is the snippet that errors,
Set csv = New CSVinterface With csv.parseConfig .path = PROJECT_PATH & "data.csv" .dialect.fieldsDelimiter = "," .dialect.recordsDelimiter = vbCrLf End With With csv .ImportFromCSV .parseConfig .DumpToSheet SheetName:=DATA_SHEET End With I've sourced the error to the FolderExists function within CSVTextStream class. It looks like the detection method here does not work for system folders. FolderExists("C:\Users\user\AppData") always returns False.
Private Function FolderExists(ByVal filePath As String) As Boolean FolderExists = CBool(LenB(Dir(filePath, vbDirectory))) End Function To Reproduce
Steps to reproduce the behavior:
- Add csv file to C:\Users\user\AppData\Roaming\project\data.csv
- Attempt ImportFromCSV method of CSVinterface
- See error
Expected behavior
Data is imported
Desktop (please complete the following information):
- OS: 11
- Host Application: Excel
- Version: Version 2502 (Build 18526.20546 Click-to-Run)
ws-garcia
Metadata
Metadata
Assignees
Labels
fixedThe issue has been correctedThe issue has been corrected