Re: Why I can't import Google AdSense CSV file???

On Sat, 2005-12-02 at 01:03 +0100, Nomine Mutato wrote:
On Fri, 11 Feb 2005 16:10:59 -0700
"Andreas J. Guelzow" <aguelzow taliesin ca> wrote:

On Fri, 2005-11-02 at 23:30 +0100, Nomine Mutato wrote:
Hi to all. I tried to build a simple analysis system for CSV report
by Google AdSense, but Gnumeric said that it can't import this file
because is unknow format.

If I do ~$ file report.csv from command line /bin/file said: 
"report.csv: MPEG ADTS, layer I, v1,  96 kBits, 44.1 kHz, Stereo"

I tried to ~$ cat report.csv | awk '{print $1,$2,$n...}' >
myreport.csv, but myreport.csv is same file of report.csv. It's a
binary file! 

If I do ~$ strings report.csv result is an empty file! 

Can you help me? I can't share my CVS file report, because Google
policy about it forbids that, but if want I can edit this by hand
with non true data, and attach this onto mail message.


CSV files (comma separated values) are text files. If you look into
the file using cat or less or more you should see straight text. If
you don't then your file is _not_ a csv file.

Google said it's a CSV file... OOo Calc open correctly this
file... I suppose it is a "CSV from Microzoz" or similar way.

I like this "CSV from Microzoz". But it is much simpler:

It is indeed a csv file (at least in the widest of definitions.

To open it in gnumeric:

start gnumeric, select open, select the file, choose file type:
"comma or tab separated" of "textimport (configurable)"
choose character encoding Unicode->UTF16LE

the file should open.

Note that the fields a separated by blanks, but gnumeric is likely to
figure that out correctly.

There is one little problem: the file uses comma as a decimal separator.
Currently you can't select this on import, so to import this file
correctly you need to use a locale that uses comma as a decimal

If you don't mind I would like to use this file to enter a bunch of bug
reports against Gnumeric. I can make gnumeric crash with it.



I had encode head of this file with no true data:

-- cut starts below this line --
begin-base64 644 google-report
-- cut end above this line --

Cut and paste this code into your file named report.uu, and then try
from command line

~$ uudeconde -o report.csv report.uu
~$ file report.csv 

and look result. You can read this file with cat and less, but it is a
binary file!

See too: uuencode(5) uudecode(5).

gnumeric-list mailing list
gnumeric-list gnome org

Andreas J. Guelzow
Taliesin Software, Shelties, Pyr Sheps
and Shetland Sheep

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]