[Gambas-user] Trouble with CSVFile Component

Tony Morehen tmorehen at ...3602...
Fri Jul 28 03:43:49 CEST 2017


Did you add gb.utils component to your project?

Project->Properties->Components & check gb.utils


On 2017-07-27 07:10 PM, markwalt wrote:
> 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.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list