I am experiencing a problem where MS hangs when I read a huge CSV file containing more than 10k records. What is another alternative to using csvfiletoarray?
I have to read all records from the csv and then transfer it to the database. Would DB query be a better option? Or Readln (and removing the delimiters of course)?
CSVFiletoarray reading large file
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
DBQuery or use the XL commands to read one cell at a time.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: CSVFiletoarray reading large file
I have a large CSV-file (almost 3MB big, 18 000 rows, 12 columns) and I have problems importing this as an array when compiled my script as a EXE-file.
Is there something I should know about the CSVFileToArray regarding limits?
Is there something I should know about the CSVFileToArray regarding limits?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: CSVFiletoarray reading large file
What problems? Should be absolutely no difference between any script running as a .exe vs not.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: CSVFiletoarray reading large file
It crashes the program, i.e. "not responding". I have managed to get it to run the complete cycle once in maybe 10-15 tries...
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: CSVFiletoarray reading large file
I just realized that I use semicolon ";" as delimiter instead of comma ","
Could this be the problem (even though I get it to work in the editor)?
Could this be the problem (even though I get it to work in the editor)?
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: CSVFiletoarray reading large file
I found out that a DelArray> just prior to the CSVFileToArray> was causing the problem. I just removed the DelArray> and it worked just fine. Sorry for flagging this as an issue.