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? |
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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gambas-user |
Nope.
Told ya I was a newb. 20+ years ago I used to do a lot of work in VB, and especially VBA. It's been a while, and my programming muscles have atrophied a bit. And while Gambas feels very familiar, it's also quite different, and I'm still acclimating to it. Thanks for your help :-) On Thu, Jul 27, 2017 at 6:43 PM, Tony Morehen <[hidden email]> wrote: > 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.c >> om/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 >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > -- -Mark ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gambas-user |
In reply to this post by markwalt
I use CSV files all the time. I find them easy and fast. Have a look at the attached example, hopefully it will help. CLIOnly1.tar Check out www.gambas.one |
In reply to this post by markwalt
2017-07-27 21:48 GMT-04:00 Mark Walters <[hidden email]>:
> And while Gambas feels very familiar, it's also quite different, and I'm > still acclimating to it. > always will be difference in any case, please dont assume any new artifac always want to emulate guindows.. > Thanks for your help :-) > in the IDE *there's a menu help, in that there's a entry about farm software, here there are a lot of example, that helps so much.. its recomended too* apart of the attached example of Charlie CLIOnly1.tar <http://gambas.8142.n7.nabble. com/file/n59913/CLIOnly1.tar> > > > On Thu, Jul 27, 2017 at 6:43 PM, Tony Morehen <[hidden email]> > wrote: > > > 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.c > >> om/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 > >> [hidden email] > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > > > > > > > -- > -Mark > ------------------------------------------------------------ > ------------------ > 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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gambas-user > 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gambas-user |
Free forum by Nabble | Edit this page |