[Gambas-user] Trouble with CSVFile Component
markwalt
markwalt at ...626...
Fri Jul 28 01:10:06 CEST 2017
Hi guys,
I'm trying to write a very simple program that pulls in one CSV File, and
spits out another, based on what's inside the file.
I see from the Wiki that there's a function for that, in the db.utils
component. However, using the very sparse example provided, I'm getting
errors.
I'm using 3.8.4, which is the "current" version in my distro (Xubuntu
16.04.2 LTS), and the documentation says the feature was available as of
Gambas 3.7.
Here's the code I'm using:
Public Sub Main()
Dim sCSVGrid As String
Dim sCSVImport As String
Dim hCSVFile As CsvFile
Print "Enter the complete path and filename of the CSV file you are
importing"
Input sCSVImport
Print "Enter the complete path and filename of the CSV file containing the
grid you are creating"
Input sCSVGrid
hCSVFile = New CsvFile(sCSVImport)
End
Obviously, it's not doing anything yet, but this simple bit of code blows up
at
Dim hCSVFile As CsvFile
saying CsvFile is an unknown identifier.
Yet, this code was taken from the example, I just added a few lines.
>From what I unerstand from the documentation, anything in db.util should be
available, but I guess I'm missing something, probably something simple.
As you can see, I'm a bit of a newb. Any tips on what I'm doing wrong?
--
View this message in context: http://gambas.8142.n7.nabble.com/Trouble-with-CSVFile-Component-tp59904.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list