THE BORE

General => The Superdeep Borehole => Topic started by: GilloD on May 13, 2009, 05:02:06 PM

Title: God what the f
Post by: GilloD on May 13, 2009, 05:02:06 PM
I HAVE TWO IDENTICAL CSV FILES. IDENTICAL. IN EXCEL AND NOTEPAD. THEY AGREE. THEY'RE THE SAME.

THE ERP WILL TAKE ONE BUT NOT THE OTHER.

WHAT THE FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU.  :cop
Title: Re: God what the f
Post by: Reb on May 13, 2009, 05:07:05 PM
Sometimes I think you're doing the wrong job GilloD.
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:11:41 PM
Sometimes I think you're doing the wrong job GilloD.

Think? Son, I know.  :zzz
Title: Re: God what the f
Post by: Howard Alan Treesong on May 13, 2009, 05:13:16 PM
I HAVE TWO IDENTICAL CSV FILES. IDENTICAL. IN EXCEL AND NOTEPAD. THEY AGREE. THEY'RE THE SAME.

are they encoded identically?
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:18:03 PM
I HAVE TWO IDENTICAL CSV FILES. IDENTICAL. IN EXCEL AND NOTEPAD. THEY AGREE. THEY'RE THE SAME.

are they encoded identically?

They're the same byte-size
Title: Re: God what the f
Post by: Eric P on May 13, 2009, 05:18:21 PM
not the same thing
Title: Re: God what the f
Post by: Eric P on May 13, 2009, 05:18:41 PM
is one a csv for txt and the other csv for xcl?
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:18:48 PM
I HAVE TWO IDENTICAL CSV FILES. IDENTICAL. IN EXCEL AND NOTEPAD. THEY AGREE. THEY'RE THE SAME.

are they encoded identically?

Also, via answer, they're both CSVs, in whatever the default is. Uni-8?
Title: Re: God what the f
Post by: drew on May 13, 2009, 05:20:16 PM
who knew being a peanut butter salesman could be so complicated
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:20:52 PM
is one a csv for txt and the other csv for xcl?

Explain. Both just pop out in .csv, one from an XLS/XML template, the other from whatever Dark Magycks swirl in the bowels of the ERP. They look identical in Excel and in a Text Ed.

I've gotten one from the XLS/XML side to work with the ERP prior, but it requires some bizzare acrobatics (It needs a seemingly random 13 total fields on each line?)
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:21:09 PM
who knew being a peanut butter salesman could be so complicated

I wish I was in Sales. I coulda had that gig.
Title: Re: God what the f
Post by: Tauntaun on May 13, 2009, 05:35:35 PM
I know nothing of what you guys speak.  I am not l337.  :'(
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:37:35 PM
didn't you make the XSL thread also?

wow, change your job man, start selling hotdogs maybe?

Haha, yes. That one was a stupid goof. I mean,. I'm just kind of learning this shit as I go along. My major was English/Philosophy with a minor in Ceramics, haha
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:45:41 PM
B,CON,,BIL,NTX,CRC,MAIL
A,BIL,Billing Address,85 North Fn Street,,Scott,BLFIELD,New Jersey,7003,United States of America
A,SHI,Shipping Address,85 North Fn Street,,Scott,BLOELD,New Jersey,7003,United States of America
D,BIL,Scott
D,SHI,Scott

That one works and no that's not my address, I f'ed it up

B,CON,,BIL,NTX,CRC,MAIL
A,BIL,Billing Address,85 North Fu Street,,Scott,Blofield,New Jersey,07003,US
A,SHI,Shipping Address,85 North Fulton Street,,Scott,Bloold,New Jersey,07003,US
D,BIL,Scott
D,SHI,Scott

That one does not. And I'm fully aware there's a zipcode/case/US discrepancy, but it doesn't matter. I've gotten it to pick up that data previously via another method (The adding junk columns method)

Whatever. I'm just gonna wait for the ERP guy to get back to me.
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:47:34 PM
Okay. So the solution is to add junk fields to every row until the number of fields is equal to the number of fields in the largest row MINUS 1.

So if the largest riow has 10 fields and the first row has only 3 fields you have to add 6 junk rows.

This is the party line. This is a 70,000 software package.

For whatever reason, the .csv files the ERP outputs doesn't need the junk rows, but no one knows why.
Title: Re: God what the f
Post by: Eric P on May 13, 2009, 05:49:50 PM
that's odd

i would have thought that the csv stuff would be pretty standard since it's a simple form.

Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:53:09 PM
that's odd

i would have thought that the csv stuff would be pretty standard since it's a simple form.



Join T. Club.

Also, did I mention there's no manual for any of this? Just a bunch of PowerPoints?
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 05:56:13 PM
haha. new mindfuck:

I brewed up a template with the requisite junk fields. And it still won't work. Unless I open it up and save it in Excel. It doesn't change the file at all. Or appears not to?
Title: Re: God what the f
Post by: Eric P on May 13, 2009, 05:58:35 PM
count the number of commas
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 06:02:02 PM
Exactly the same. Okay, I got to the bottom of this, but I don’t have a solution.

Attached are two files: 56_customer.csv and 56_customerSavedWithExcel.csv

They are literally- from a naked perspective- the same exact file. With one evident exception: The fresh from Magento version is 234 bytes. The Excel’d version is 235 bytes. That’s all I can see.

The one from Magento does not work.

The one from Excel does.

The only other thing is that the Magento encoding is coming out at ISO-8859-15, though the XML itself is in UTF-8. So the Excel MUST be doing something to it. Do you think this is an encoding issue?
Title: Re: God what the f
Post by: Howard Alan Treesong on May 13, 2009, 06:05:12 PM
It's probably adding the invisible Unicode header bytes

God, I hate Unicode. The word "Unicode" alone can mean 3 different encoding mechanisms.

UTF-8 4 lyfe
Title: Re: God what the f
Post by: demi on May 13, 2009, 06:06:28 PM
well at least you got a raise
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 06:10:08 PM
They're both in UTF-8 now and still the same problem. It needs to be saved with Excel. Jesus fucking christ
Title: Re: God what the f
Post by: Howard Alan Treesong on May 13, 2009, 06:10:48 PM
Excel adds invisible bytes too. Fucking MS Office.

I use Notepad++ to make sure I don't get invisible garbage bytes in my text files.

http://notepad-plus.sourceforge.net/uk/site.htm
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 06:11:07 PM
Actually, Sage is in ISO 8859. Whcih is what Magento was in before
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 06:11:17 PM
yeah, I'm using Notepad++
Title: Re: God what the f
Post by: GilloD on May 13, 2009, 06:13:34 PM
Excel adds invisible bytes too. Fucking MS Office.

I use Notepad++ to make sure I don't get invisible garbage bytes in my text files.

http://notepad-plus.sourceforge.net/uk/site.htm

The worst shit in the UNIVERSE is all that garbage MS Word adds if you copy/paste to the web.
Title: Re: God what the f
Post by: muckhole on May 13, 2009, 09:15:32 PM
I don't know why it is that I always read every post in these threads even though I hven't the slightest clue what's being said in them.  :dur
Title: Re: God what the f
Post by: Beezy on May 14, 2009, 12:27:25 AM
I don't know why it is that I always read every post in these threads even though I hven't the slightest clue what's being said in them.  :dur
same here :lol
Title: Re: God what the f
Post by: Fragamemnon on May 14, 2009, 12:35:21 AM
WTF-8 is my best friend.  :heartbeat

Doesn't this shit show up using a decent diff tool?
Title: Re: God what the f
Post by: GilloD on May 14, 2009, 12:21:30 PM
SOLUTION:

Did a Hex Dump (LOL, that's FIVE POOPS)- My file ends lines in 0d (CR), the working file ends in 0a(LF). fuuuuuuuuuuuuuuu
Title: Re: God what the f
Post by: recursivelyenumerable on May 14, 2009, 01:56:48 PM
heh, I called it to myself as a CRLF issue on the first post

if only I'd actually read the thread when it was new, oh well