Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Importing a csv file with bad formating.
Tue, Apr 23 2013 1:59 PMPermanent Link

philb

Michigan Investment Group LLC

I am trying to import a file that comes from eBay.  It is a .csv file, which is easy to import with this.

IMPORT TABLE EbayOrders
FROM "EbayOrders.csv"
IN STORE "Ebay"
DELIMITER CHAR ','
USE HEADERS

However, when the file is downloaded directly from eBay it contains a carriage return in the first line, then one right after the header line, and three junk lines at the bottom that have nothing to do with the data I need to import.  Is there anyway I can clean this file up without going into it every time to clear this "junk" out of there?
Tue, Apr 23 2013 8:04 PMPermanent Link

Barry

< Is there anyway I can clean this file up without going into it every time to clear this "junk" out of there? >

So why not use Delphi to write a (console or GUI) utility to take the CSV file and remove the empty lines from it before you run the import on it?

Barry
Wed, Apr 24 2013 2:34 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Barry

>< Is there anyway I can clean this file up without going into it every time to clear this "junk" out of there? >
>
>So why not use Delphi to write a (console or GUI) utility to take the CSV file and remove the empty lines from it before you run the import on it?

I thought that but then thought that would be going into it every time Smiley

Roy
Wed, Apr 24 2013 11:51 AMPermanent Link

Barry

<I thought that but then thought that would be going into it every time Smiley

Roy,

It was either that or contact ebay and get them to change their export routines. Wink

Barry
Wed, Apr 24 2013 2:29 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< However, when the file is downloaded directly from eBay it contains a
carriage return in the first line, then one right after the header line, and
three junk lines at the bottom that have nothing to do with the data I need
to import.  Is there anyway I can clean this file up without going into it
every time to clear this "junk" out of there?  >>

The problem is that a blank line "sort of" has meaning to some extent.
However, that meaning is pretty useless for most purposes, so I'll see if I
can add an option to skip blank lines.

Tim Young
Elevate Software
www.elevatesoft.com
Sat, Apr 27 2013 9:53 AMPermanent Link

philb

Michigan Investment Group LLC

Barry wrote:

< Is there anyway I can clean this file up without going into it every time to clear this "junk" out of there? >

So why not use Delphi to write a (console or GUI) utility to take the CSV file and remove the empty lines from it before you run the import on it?

Barry

This is basically what I ended up doing for now, it was what I was trying to avoid, but rewriting the file without all the spaces and the "junk" at the bottom allowed me to import it.
Sat, Apr 27 2013 9:54 AMPermanent Link

philb

Michigan Investment Group LLC

"Tim Young [Elevate Software]" wrote:

<< However, when the file is downloaded directly from eBay it contains a
carriage return in the first line, then one right after the header line, and
three junk lines at the bottom that have nothing to do with the data I need
to import.  Is there anyway I can clean this file up without going into it
every time to clear this "junk" out of there?  >>

The problem is that a blank line "sort of" has meaning to some extent.
However, that meaning is pretty useless for most purposes, so I'll see if I
can add an option to skip blank lines.

Tim Young
Elevate Software
www.elevatesoft.com

That would be great Tim, I would appreciate it.  This is a weird situation I know, and I figured out a way around it for now, but I will keep an eye on updates to see if this was put into place at any point.
Image