Error loading empty csf file

Scubaticus

Active Member
Licensed User
When I try to load an empty but existing csv with loadCSV, it rises the error "Index was outside the bounds of the array" (loadCVS("csv", ",", FALSE, FALSE)

When i do the same with an headered csv file I don't get errors.

How to find out if an csv file without headers is empty? I could use errorlabel I guess, but I want to know if there are records or not and not if the file exists or not.

Scub
 

Scubaticus

Active Member
Licensed User
Well, not complete emtpy. It returns 3 bytes.
But writing en empty table with saveCSV is no problem an causes no error.

Perhaps it's an idea to return the actual records readed or written to csv?

RecsIn = loadCSV(..)

But for now the filesize will do. Thanks for your quick reply.

Scub
 

agraham

Expert
Licensed User
Longtime User
Excuse my ignorance and jumping in to your thread, but loadCSV looks useful but where is it located? I'm probably being stupid but it's not a native sub and I can't seem to find any component with it in?

EDIT : I was being stupid, I've found it now. I didn't expect it to be a control method.:sign0161:
 
Last edited:
Top