How can I read CSV files without Microsoft Access Runtime installed?
- 2 days ago
You’ve run into a known limitation, at the moment there isn’t a true drop-in replacement provided. It would also be worth raising this as an enhancement request. Given that Access Runtime is now EoVS, having a native CSV driver without external dependencies would help a lot of teams in similar situations.
If you want to avoid a large refactor, a practical workaround is to create a small wrapper that mimics the DDT.CSVDriver interface. That way, your existing looping logic can remain mostly unchanged and you only replace the driver initialization.
This won’t be a perfect replacement, but it’s usually enough to keep existing tests running with minimal changes. Just be aware that a simple implementation may not handle more complex CSV cases (quoted values, embedded commas, etc.), so you may need to extend it depending on your data.
// In your script replace // var DataSS = DDT.CSVDriver(file); // with var DataSS = CustomCSVDriver(file);function CustomCSVDriver(file) { var f = aqFile.OpenTextFile(file, aqFile.faRead, aqFile.ctANSI); var lines = []; while (!f.IsEndOfFile()) { lines.push(f.ReadLine()); } f.Close(); var headers = lines[0].split(","); var index = 1; return { ColumnCount: headers.length, currentRow: [], ColumnName: function(i) { return headers[i]; }, Value: function(i) { return this.currentRow[i]; }, Next: function() { this.currentRow = lines[index].split(","); index++; }, EOF: function() { return index >= lines.length; }, Name: "CustomCSVDriver" }; }If this resolves your scenario, marking it as the solution helps future readers find it quickly.