On Wed, Sep 15, 2010 at 9:29 AM, Rick Root wrote:
Unfortunately, using your code (except using createObject instead of
javaloader, as I have the library in CF's classpath), I get the same
error.
Here's a function that uses opencsv http://opencsv.sourceforge.net/ 2.1,
another CSV
On Thu, Sep 16, 2010 at 12:04 AM, Paul Hastings p...@sustainablegis.com wrote:
On 9/16/2010 2:45 AM, Rick Root wrote:
http://www.opensourcecf.com/1/2010/09/Example-of-using-JavaCSV-CSVReader-class-to-read-CSV-files.cfm
pretty sure the numeric columns for csvReader are 0 based (ie 1st column
Use the JavaCSV library to read and writing CSV files with coldfusion.
You'll NEVER have to worry about parsing CSV files again =)
This java library handles all kinds of things like this. Dealing with
CSV files in coldfusion can be a real pain in the ass once you start
dealing with files where
BTW in my own interest, having never actually used the CsvReader class
(only the CsvWriter class), I started to attempt to write some sample
code...
Unfortunately, this is as far as I got :)
cfset filename = test.csv
cfset fileInput = createObject(java,com.csvreader.CsvReader)
cfset
If I recall correctly, I experienced problems when using just a file name as
well. But was successful by using constructor using the filename, delimeter,
and charset. I hope you can see what changes you're need from the code below
which works within the context of my app but doesn't work on its
Unfortunately, using your code (except using createObject instead of
javaloader, as I have the library in CF's classpath), I get the same
error.
On Wed, Sep 15, 2010 at 10:52 AM, Dorioo dor...@gmail.com wrote:
If I recall correctly, I experienced problems when using just a file name as
well.
On 9/15/2010 9:33 PM, Rick Root wrote:
The third line errors with the following error:
An exception occurred when instantiating a Java object. The class must
not be an interface or an abstract class.
out of curiosity i gave that lib a spin, very nice.
your error looks like a poorly worded
On Wed, Sep 15, 2010 at 1:01 PM, Paul Hastings p...@sustainablegis.com wrote:
your error looks like a poorly worded file not found message. try full path
to
CSV file.
Yeah, that was it.
And yes, VERY poorly worded =)
Rick
Okay, I wrote some sample code and tested it for using JavaCSV to read
a CSV file.
http://www.opensourcecf.com/1/2010/09/Example-of-using-JavaCSV-CSVReader-class-to-read-CSV-files.cfm
My test file didn't have headers so this just generically dumps the
csv into a very generic query.
Rick
On 9/16/2010 2:45 AM, Rick Root wrote:
http://www.opensourcecf.com/1/2010/09/Example-of-using-JavaCSV-CSVReader-class-to-read-CSV-files.cfm
pretty sure the numeric columns for csvReader are 0 based (ie 1st column is
referenced as 0 not 1).
yes, i'm too lazy to register on your blog.
In Windows a line feed is actually #chr(10)##chr(13)#. However, if you
remove those you will probably remove ALL line feeds in your file instead of
just the double line feed that is causing you problems. This can be tricky,
but you will probably want to look for
Try Chr(10) also like:
cfset newcsvfile = replace(csvfile, '#chr(10)#', '', ALL)
I just had to do that with a message digest that wasn't being verified
correctly,
Phil
On Tue, Sep 14, 2010 at 1:17 PM, Phillip Vector
vec...@mostdeadlygame.comwrote:
I have the following data...
No need for the extraneous pound signs.
cfset newcsvfile = replace(csvfile, chr(10), '', ALL)
On Tue, Sep 14, 2010 at 1:26 PM, Phillip Duba phild...@gmail.com wrote:
Try Chr(10) also like:
cfset newcsvfile = replace(csvfile, '#chr(10)#', '', ALL)
I just had to do that with a message
13 matches
Mail list logo