.xls file with \t as separator doens't open in OOcalc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

.xls file with \t as separator doens't open in OOcalc

christophe nauwelaers
Hi,

First thread on this mailing list.

I make query/reports from php/mysql to .xls files (because people who I
work for use MSOffice).
I use the PHP "header : " function and the \t as the column separator.
The generated .xls file opens great in Excel, but in OOo : I'm asked to
set the language, font type, list separator and the file opens in ...
OOwriter !
I'm quiet disappointed because I'd really like users of my company to
use OOo.
Strangely, Gnumeric opens the file as MSExcel do : no problem.
Is this an issue with OOo ? Or is there something to set differently ?

thx for letting me know.

Cheers,

user@cns_on_debian

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: .xls file with \t as separator doens't open in OOcalc

Ain Vagula
Christophe Nauwelaers wrote:

> Hi,
>
> First thread on this mailing list.
>
> I make query/reports from php/mysql to .xls files (because people who I
> work for use MSOffice).
> I use the PHP "header : " function and the \t as the column separator.
> The generated .xls file opens great in Excel, but in OOo : I'm asked to
> set the language, font type, list separator and the file opens in ...
> OOwriter !
> I'm quiet disappointed because I'd really like users of my company to
> use OOo.
> Strangely, Gnumeric opens the file as MSExcel do : no problem.
> Is this an issue with OOo ? Or is there something to set differently ?
>
> thx for letting me know.
>
> Cheers,
>
> user@cns_on_debian

Because this format has nothing to do with Excel format and OO.o understands
this as file has no xls structure. You can open this file in calc using
right filter - File - Open, select file, then select filter: CSV text file
(.csv, .txt) and click Open.
Pure spreadsheet programs understand too, that is is simple text file but
they try to convert this to spreadsheet, because they have no word
processor. OO.o has one.
When you rename random file, eg. mp3 to xls, this does not convert it
xls-file anyway.

ain


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: .xls file with \t as separator doens't open in OOcalc

Eric Wood-2
Ain Vagula wrote:

>Because this format has nothing to do with Excel format and OO.o understands
>this as file has no xls structure. You can open this file in calc using
>right filter - File - Open, select file, then select filter: CSV text file
>(.csv, .txt) and click Open.
>Pure spreadsheet programs understand too, that is is simple text file but
>they try to convert this to spreadsheet, because they have no word
>processor. OO.o has one.
>  
>

Ain,

Simple rule, "if the file is some kind of delimited text (tab, comma,
pipe, colon, whatever), calc should try and open it".
In the real world , there is *so* many tab delimited files coming from
unlimited number of systems, that the simplest way to produce a quick
spreadsheet is to use delimited text and name the file extension to the
associated spreadsheet program.

All this talk about "you must name your file .CVS or click File->Open
and go through fixing the incorrect parse wizard" is so tedious that
even Microsoft and Corel understood this nuisance and slicked things up
a bit in the spreadsheet programs.  .CVS is not even an option to
associated during install-time.  Just this one installation feature
could help out tremendously.

Calc really dropped the ball on this specific kind of automation.  
There's been many people suffer from this same limitation.  They assume
that by merely associating .xls, any file will open up in calc and ask
how to parse the text.... and I say, "fine!"

On a windows platform, the open handler should have done:

1. soffice launches
2. Notice it's filename extension and try to open the file under the
"appropriate" module, xls -> calc, .doc -> writer.
3. If actual file contents is of the proper filetype, then continue
loading. ie, the .xls is indeed a BIFF compliant Excel file.
4. If file is actually text within, don't blindly give it to writer, Let
calc *continue* to be given the opportunity to parse it.
5. Calc should sample the lines in the text file. If it is *obvisouly*
tab or comma delimited, preselect those filtered options (user just
clicks ok).



-eric wood

 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: .xls file with \t as separator doens't open in OOcalc

Randomthots
In reply to this post by christophe nauwelaers
Christophe Nauwelaers wrote:

> Hi,
>
> First thread on this mailing list.
>
> I make query/reports from php/mysql to .xls files (because people who I
> work for use MSOffice).
> I use the PHP "header : " function and the \t as the column separator.
> The generated .xls file opens great in Excel, but in OOo : I'm asked to
> set the language, font type, list separator and the file opens in ...
> OOwriter !
> I'm quiet disappointed because I'd really like users of my company to
> use OOo.
> Strangely, Gnumeric opens the file as MSExcel do : no problem.
> Is this an issue with OOo ? Or is there something to set differently ?
>
> thx for letting me know.
>
> Cheers,
>
> user@cns_on_debian


Can you modify your php/mysql script to make the file a .csv instead?
Then it should work in either Excel or Calc equally well.

--

Rod


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: .xls file with \t as separator doens't open in OOcalc

Ain Vagula
In reply to this post by Eric Wood-2
Eric Wood wrote:

> Ain Vagula wrote:
>
>>Because this format has nothing to do with Excel format and OO.o
>>understands this as file has no xls structure. You can open this file in
>>calc using right filter - File - Open, select file, then select filter:
>>CSV text file (.csv, .txt) and click Open.
>>Pure spreadsheet programs understand too, that is is simple text file but
>>they try to convert this to spreadsheet, because they have no word
>>processor. OO.o has one.
>>  
>>
>
> Ain,
>
> Simple rule, "if the file is some kind of delimited text (tab, comma,
> pipe, colon, whatever), calc should try and open it".
> In the real world , there is *so* many tab delimited files coming from
> unlimited number of systems, that the simplest way to produce a quick
> spreadsheet is to use delimited text and name the file extension to the
> associated spreadsheet program.
>

Yes. I know this.
When right-click test.xls in file manager and choose 'Open with
OpenOffice.org calc', file opens in Writer. When I rename file to test.csv
and do the same operation, it opens in Calc, bringing up dialog asking for
delimiter and other necessary import data.
Hm, btw, using the filter in open-save dialog, delimiter is automatically
detected and marked (tab), in described case not...

ain


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: .xls file with \t as separator doens't open in OOcalc

christophe nauwelaers
Hi Ain
Thanks, I totally agree with you and you just made the comment I was about
to write.
I like OOo very much and use it as often as I can, but this problem is one
of its limits, especially when you look forward for other people to use OOo
instead of MSOffice.

Rod : yes, I first made a .csv file from my PHP script. But the users where
to lazzy to change the separator list character in their "Regional
settings". The first goal of my report is to be easily open in Excel for my
users, that's why a generate a .xls instead of a .csv.

Cheers,


On 11/16/05, Ain Vagula <[hidden email]> wrote:

>
> Eric Wood wrote:
>
> > Ain Vagula wrote:
> >
> >>Because this format has nothing to do with Excel format and OO.o
> >>understands this as file has no xls structure. You can open this file in
> >>calc using right filter - File - Open, select file, then select filter:
> >>CSV text file (.csv, .txt) and click Open.
> >>Pure spreadsheet programs understand too, that is is simple text file
> but
> >>they try to convert this to spreadsheet, because they have no word
> >>processor. OO.o has one.
> >>
> >>
> >
> > Ain,
> >
> > Simple rule, "if the file is some kind of delimited text (tab, comma,
> > pipe, colon, whatever), calc should try and open it".
> > In the real world , there is *so* many tab delimited files coming from
> > unlimited number of systems, that the simplest way to produce a quick
> > spreadsheet is to use delimited text and name the file extension to the
> > associated spreadsheet program.
> >
>
> Yes. I know this.
> When right-click test.xls in file manager and choose 'Open with
> OpenOffice.org calc', file opens in Writer. When I rename file to test.csv
> and do the same operation, it opens in Calc, bringing up dialog asking for
> delimiter and other necessary import data.
> Hm, btw, using the filter in open-save dialog, delimiter is automatically
> detected and marked (tab), in described case not...
>
> ain
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>