Use Windows 10 Zip built in utility. Or download a more recent version.
The zip file is 26.987 Bytes… in case your download was bad.
OK .... here are two more links. One for the Xojo binary project and one for a sample INI file. Both are NOT ZIPPED. You should be able to load the CSVframework.xojo_binary_project directly into the Xojo IDE. You can open the MyConfigSettings.ini sample file with notepad.
Let me know if you have trouble with these links and I will do something else.
Thank you Mark. I managed to load it into Xojo and am looking through all the code. Going to take me a while to understand I'm sure. The csv files I access do not have column names in the first row. We have the data file map and code off of it.
Sure I am going to have questions. I'll be back...LOL
By the way. I did go ahead and buy the xDev magazine with the Xojo beginners article.
Since you don't have column names you can comment out that chunk of code in the FindTheFile method BUT you will also need to modify the data load method (LoadArray) since it assumes the number of names in the first row to be the number of columns in the data portion of the file. You can just modify the code like this:
'Loop through the input row based on the number of columns found when ' the first row was processed by the FindTheFile method. for i = 0 to ColumnNames.Ubound
'To this code since the ColCount is already calculated a few lines above here
'Loop through the input row based on the number of columns found in ' the data row just read. for i = 0 to ColCount
I hope this helps you get this modified to work with your data.
One thing I noticed. You have file type and extension listed as CSV. But the files I use are extension jcp, made the change with no problem. But end users will access drf, or jcp or mcp depending on what data file provider they use. I tried to add all three in place of the csv and it didn't work. How do I include all three extensions?
@milford w One thing I noticed. You have file type and extension listed as CSV. But the files I use are extension jcp, made the change with no problem. But end users will access drf, or jcp or mcp depending on what data file provider they use. I tried to add all three in place of the csv and it didn't work. How do I include all three extensions?
Mark's response is correct but if you're on Windows it seems that the leading dot is necessary, as in:
I don't understand why a bug shows up here.
'Open the input file
InPath = INIfile
InFile = new FolderItem(InPath,FolderItem.PathTypeNative)
*** BUG HERE*** InStream = TextInputStream.Open(InFile)
catch err as IOException
er = "Input File Error : " + str(err.ErrorNumber)
INIfile is the full path to a configuration file that contains info your program might need. I included this code in the sample because I figured you might need to handle a configuration file in your final code.
The error is probably because the file is missing in the folder where the EXE file exists when you are running it in debug mode.
The INI File that I included called MyConfigSettings.ini is assumed to be in the same folder with the EXE file. The CopyFile setting in the Build Settings should copy the sample file to the same place the EXE file. Based on how you set up your folder structure is probably the issue.
For now just comment out the call to the INIfunctions.GetKey in the App.Open event.
Welcome to Xojo!
Now, just a few housekeeping points to keep in mind:
In the other thread, @Norman P gave you good advise. Once you study and try things, ask specific questions. This community is among the most helpful around. People here will help. You will get the best answers when you ask clear and well documented questions, where you show what you tried and clearly describe your issue.