The file is something like
Part,PartDesc,OrderRef,Qty,orderdate
XX9999,A descriptoin of an Item,OrderRefno222,1,14/05/2004 15:20

you get the idea

It is the date that kills me!

MD

On Wed, 25 Aug 2004 10:20:29 -0400, Marc Campeau <[EMAIL PROTECTED]> wrote:
> > > > Anybody have a UDF for this? I need it sharpish, I can write it myself
> > > >  but if someone else has done this.. whooho!
>
> I use a Java library (ExcelCSVParser) from www.Ostermiller.com. You
> can find some other great utils there too.
>
> This is the code I use to parse a CSV file... it creates an array not
> a query though.
>  <!--- Convert CVS file to matrix(java.lang.String[][]) for easier
> manipulation --->
>  <cflock timeout="10" throwontimeout="Yes" name="ImportTasks" type="EXCLUSIVE">
>  <cfscript>
>  f = createObject( "java", "java.io.FileInputStream" );
>  f.init("#REQUEST.DOCUMENT_DIRECTORY#\#File.ServerFile#");
>
>  parser = createObject( "java", "com.Ostermiller.util.ExcelCSVParser" );
>  parser.init( f );
>  csvArr = parser.getAllValues();
>  parser.close();
>  f.close();
>  </cfscript>
>  </cflock>
>
> --
> Marc
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to