Bug 37972 - FILEOPEN .xls file with HTML table should be load in Spreadsheet instead of Writer
Summary: FILEOPEN .xls file with HTML table should be load in Spreadsheet instead of W...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: (target:3.5.0)
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-06 01:32 UTC by scls19fr
Modified: 2012-05-08 07:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
XLS file containing HTML table (from ZuluTrade) (93.78 KB, application/msexcel)
2011-06-06 01:32 UTC, scls19fr
Details
XLS file containing HTML table (from Tradency) (78.63 KB, application/msexcel)
2011-06-06 01:34 UTC, scls19fr
Details
Another kind of file which open with Excel... but not with OpenOffice Calc (350.21 KB, application/msexcel)
2011-06-14 02:01 UTC, scls19fr
Details
Automated 'read out' from a remote fuel tank gauage (1.82 KB, application/vnd.ms-excel)
2011-06-30 00:35 UTC, David Clayton
Details
another exaple of the spreadsheet format that doesn't load in Calc (1.78 KB, application/vnd.ms-excel)
2011-09-16 01:53 UTC, David Clayton
Details
Sample 1 html xls file that is not opened in calc (1.80 KB, application/vnd.ms-excel)
2012-05-08 05:26 UTC, David Clayton
Details
Sample 2 html xls file that is not opened in calc (8.12 KB, application/vnd.ms-excel)
2012-05-08 05:26 UTC, David Clayton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description scls19fr 2011-06-06 01:32:40 UTC
Created attachment 47586 [details]
XLS file containing HTML table (from ZuluTrade)

Hello,

I found on some websites .xls file that contain HTML table.
See attachment of such file that can be found on Tradency or ZuluTrade.
Using MS Office, these kind of file are opened with Excel... and not Word
It should be the same with LibreOffice.
(because there are opened with Writer instead of Spreadsheet even when I click on File menu/Open in Spreadsheet !)

Kind regards
Comment 1 scls19fr 2011-06-06 01:34:34 UTC
Created attachment 47587 [details]
XLS file containing HTML table (from Tradency)
Comment 2 tester8 2011-06-06 12:15:41 UTC
Reproduced with Ubuntu 10.04.2 x86
LO 3.4

Opens in Calc with double click.
Opens in Writer with drag-n-drop, File->Open, "open with" and command line.
Comment 3 scls19fr 2011-06-06 20:33:03 UTC
I'm using Mac OS X 10.6.7
Comment 4 scls19fr 2011-06-14 02:01:35 UTC
Created attachment 47927 [details]
Another kind of file which open with Excel... but not with OpenOffice Calc
Comment 5 Rainer Bielefeld Retired 2011-06-20 09:45:35 UTC
NOT reproducible with any of the first 3 smaple documents and "LibreOffice 3.4.1RC1  – WIN7  Home Premium  (64bit) German UI [OOO340m1 (Build:101)]". I opened documents directly from Seamonkey browser with LibO. 

OS related or fixed in between?

Modified OS due to Comment 2

I will assign due to several confirmations.

I am pretty sure that I saw a similar bug few time ago, but I can't find it.

@scls19fr:
Please always contribute information concerning your LibO version and localization!

@Kohei:
Please feel free to reassign if it’s not your area or if provided information is not sufficient.
Comment 6 scls19fr 2011-06-20 10:23:16 UTC
I'm using now
LibreOffice 3.4.0 
OOO340m1 (Build:12)
French localization
under Mac OS

but I don't think it is OS related because as I have the same problem with Windows XP.
Comment 7 David Clayton 2011-06-30 00:35:57 UTC
Created attachment 48580 [details]
Automated 'read out' from a remote fuel tank gauage

Loads blank sheet. if opened as 'read only' sometimes the data is displayed, but as you would expect, does not permit editing.
Comment 8 David Clayton 2011-06-30 00:44:14 UTC
Hi,

this was previously fixed in Open Office 3.2 so can we class as a regression?

the original fault was fixed under 

http://openoffice.org/bugzilla/show_bug.cgi?id=89332

David
Comment 9 Rainer Bielefeld Retired 2011-06-30 01:47:07 UTC
I doubt that problem from Comment 7 is the same as reported, but might be related.
Comment 10 David Clayton 2011-09-16 01:53:12 UTC
Created attachment 51256 [details]
another exaple of the spreadsheet format that doesn't load in Calc
Comment 11 David Clayton 2011-09-16 01:54:13 UTC
Hi all,

I have updated the affected version - as I have tested in 3.4.3 OOO340m1 (Build:302) running on Windows 7 and Windows Vista 32bit.

I have attached a sample file.

Expected behaviour - open with Calc, should load as a 'normal' spreadsheet.
result - Calc loads and opens with a blank spreadsheet with no data.

Workaround - change 'default program' to sweb.exe. Content loads and is 'readable', however this cannot be edited as would be possible under Calc.

This issue has been going on for some time now and has been present in several point versions, so I would like to see if we can get this addressed.

David
Comment 12 Kohei Yoshida 2011-09-16 07:27:07 UTC
Known issue.  A workaround is to open it from Explorer (if you are on Windows) and specify Calc as the application to open it.

The reason is that, LibreOffice determines which app to open an HTML file solely based on the file content, which is HTML in this case, regardless of where you open the file from.  The extension plays a very little role here unfortunately.

This is in fact a long standing issue dating back to the very old version of OOo.  I remember this because I filed the same bug against OOo many years ago.

To fix this, we need to send from which app the file is being opened, to the file detection code, and use it as a hint in case the file format alone cannot determine which app should open the file (which HTML file format is a prime example).  We already do something similar when opening a file from the command line when --calc option is passed.

Anyway this is not a Calc specific issue but applies to the shared framework code.

BTW please don't set the status to ASSIGNED unless I specifically set it.
Comment 13 David Clayton 2011-09-16 08:29:34 UTC
(In reply to comment #12)
> Known issue.  A workaround is to open it from Explorer (if you are on Windows)
> and specify Calc as the application to open it.
> 
> The reason is that, LibreOffice determines which app to open an HTML file
> solely based on the file content, which is HTML in this case, regardless of
> where you open the file from.  The extension plays a very little role here
> unfortunately.
> 
> This is in fact a long standing issue dating back to the very old version of
> OOo.  I remember this because I filed the same bug against OOo many years ago.
> 
> To fix this, we need to send from which app the file is being opened, to the
> file detection code, and use it as a hint in case the file format alone cannot
> determine which app should open the file (which HTML file format is a prime
> example).  We already do something similar when opening a file from the command
> line when --calc option is passed.
> 
> Anyway this is not a Calc specific issue but applies to the shared framework
> code.
> 
> BTW please don't set the status to ASSIGNED unless I specifically set it.

Hi Kohei,

Thank you for your quick response. I tried your suggestion of setting Calc as the 'open with' application, however this does not change anything for me (on windows 7), I continue to get a blank spreadsheet.

I can remember the bug from OO about 2.x, I think I too commented on it at the time. As far as I know this was actually fixed at 2.4, however when 3.x came out I found that this had the issue back, and thought it would be a minor fix to add to the 3 build....this didn't happen and hence where we are now with the LO  code base.

I assumed that the handling of the file would have been identified by the file extension, before the app performed some type of analysis as to the contents, so the sequence would go File > Calc > HTML, whereas you are saying that the process is more File > HTML > Calc.

as to why mine is just blank when I specify the app, I am unsure but I will try and test on the Vista and an XP machine.

As far as I know I didn't change the status, it wasn't intentional so please accept my apologies. 

David
Comment 14 David Clayton 2012-01-11 08:40:35 UTC
This issue looks to have been resolved in LO 3.5.0beta2

could someone else confirm.

David
Comment 15 tester8 2012-02-14 01:41:55 UTC
NOT reproduced with

LibreOffice 3.5.0rc3
7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Ubuntu 10.04.3 x86
Linux 2.6.32-38-generic Russian UI

So RESOLVED.
Comment 16 David Clayton 2012-05-08 02:03:09 UTC
Hi,

Changed to re-opened. looks like regression

I was hoping this had been fixed for good. Seems to have only come back in 3.5.3.2 Could someone confirm. As far as I am aware it didn't happen under 3.5.2 I can supply sample files if required.

David
Comment 17 Rainer Bielefeld Retired 2012-05-08 04:25:26 UTC
"It happens" is a very rare description

My results with attached samples and "LibreOffice 3.5.3.2 (RC2) German UI/Locale [Build-ID: 235ab8a-3802056-4a8fed3-2d66ea8-e241b80] on German WIN7 Home Premium (64bit) opening documents from LibO File open dialog.
- ZuluTrade-TradeHistory.xls, indicated as .csv, 
  opens with visible html tags as .csv  with message
  "max number of rows exceeded"
- Performance.xlsindicated as .csv, 
  opens with visible html tags as .csv in CALC 
+ Zulutrade_BBSqueeze_Performance_2011-06-13.xls opens in CALC as a normal
  Spreadsheet
- BATA001-001 Service Issues 2011-06-30 05-16-28.xlsindicated as .csv,  
  opens with visible html tags as .csv in CALC 
- BATA001-003 Current Levels 2011-09-16 08-28-42.xls, indicated as .csv, 
  opens with visible html tags as .csv in CALC 

That looked much better with "LibreOffice 3.5.2.2 German UI/Locale [Build-ID: 281b639-6baa1d3-ef66a77-d866f25-f36d45f] on German WIN7 Home Premium (64bit), where all documents were opened as spreadsheets.

The 3.5.3 behavior is completely different from behavior in 3.4.5, where the Documents simply opened in WRITER, so the bug did not reappear, but a new  different problem came up. I am tending to close this bug again as WFM and to open a new one for the new problem, but let's wait for David's results.

@David Clayton:
<https://wiki.documentfoundation.org/BugReport_Details#General_hints>
Are your results confidential or can you tell us your observations?
Comment 18 David Clayton 2012-05-08 05:24:11 UTC
Hi Rainer, 

Sorry I didn't test with the existing files, and my description was a bit vague. I will upload my two test case files, and could open another report if required.

When you open the files in calc you get an import dialogue, and the data is brought in with all the html formatting. If you delete the .xls file exension and open using sweb.exe, the table and data seem as expected.

one of the other bug reports sightly better described the behavior, but was closed as a duplicate as the problem / solution was the same 

Tested on Win 7 32bit and Win Vista, it has only just started happening on 3.5.3 after we upgraded these machines last week.

David
Comment 19 David Clayton 2012-05-08 05:26:00 UTC
Created attachment 61221 [details]
Sample 1 html xls file that is not opened in calc
Comment 20 David Clayton 2012-05-08 05:26:22 UTC
Created attachment 61222 [details]
Sample 2 html xls file that is not opened in calc
Comment 21 Rainer Bielefeld Retired 2012-05-08 07:11:16 UTC
So that's something new here and I close the bug again.

@David Clayton
Can you please report a new Bug with reference the the sample documents here for the new problem?
Comment 22 David Clayton 2012-05-08 07:19:18 UTC
okay. I have opened Bug 49639. David
Comment 23 David Clayton 2012-05-08 07:20:24 UTC
Status change must be cached on edit / submit comment. It was just closed!
Comment 24 Rainer Bielefeld Retired 2012-05-08 07:35:17 UTC
Life is full of surprises, closed again