Bug 43685 - FILESAVE FILEOPEN Entity: line 1: parser error : Start tag expected, '<' not found Unable to open some spreadsheets using --calc option
Summary: FILESAVE FILEOPEN Entity: line 1: parser error : Start tag expected, '<' not ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: x86 (IA32) Linux (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-10 01:54 UTC by Colin Law
Modified: 2012-02-23 06:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet showing the problem, generated by above procedure. (8.31 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-12-10 01:54 UTC, Colin Law
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Law 2011-12-10 01:54:46 UTC
Created attachment 54282 [details]
Spreadsheet showing the problem, generated by above procedure.

Problem description: 

Steps to reproduce:
1. Open LibreOffice Calc
2. Enter some text in first cell
3. Save the file as test.ods (filename not significant)
4. Select Tools > Macros > Organize Macros > LibreOffice Basic
5. Click Organiser
6. Select test.ods
7. Click New
8. Change name to ThisWorkbook and click OK (the name is significant)
9. Click Close and Close again
10. Save the document
11. Close the document
12. In a terminal in the appropriate directory attempt to open the file using the command:
libreoffice --calc test.ods

Current behavior:
The error

Entity: line 1: parser error : Start tag expected, '<' not found
PK
^

is seen in the terminal and the spreadsheet opens empty.

Expected behavior:

The spreadsheet should open.

Note that if the command
libreoffice test.ods
is used then it opens correctly

Platform:
Ubuntu 11.10 up to date.  LibreOffice installed from ubuntu repository.
              
Related Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/899190

I believe this is a regression introduced around two months ago as a spreadsheet that I have started failing around that time.
It seems that the name of the module (ThisWorkbook) is significant.
Comment 1 Chris Peñalver 2011-12-10 04:55:12 UTC
Severity > Critical as this technically causes data loss but has a workaround to recover it. 

1) lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

2) apt-cache policy libreoffice-calc
libreoffice-calc:
  Installed: 1:3.4.4-0ubuntu1
  Candidate: 1:3.4.4-0ubuntu1
  Version table:
 *** 1:3.4.4-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1:3.4.3-3ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages

3) What is expected to happen in a blank LibreOffice Calc file:

type testit in cell A1 -> File -> Save As -> File name: testit -> File type: ODF Spreadsheet (.ods) -> Save button -> Tools -> Macros -> Organize Macros -> LibreOffice Basic... -> click testit.ods ->
Organizer... -> select testit.ods -> click New -> OK button -> with Module1 highlighted click New -> in the text box Name: ThisWorkbook -> OK button -> Close button -> Close button -> Save -> File -> Exit and reopen by double clicking the file or via the Terminal:

libreoffice --calc testit.ods

and it opens successfully.

4) What happens instead is the document is blank and the Terminal shows:

libreoffice --calc testit.ods
Entity: line 1: parser error : Start tag expected, '<' not found
PK
^

WORKAROUND: Open it via the Terminal command:

libreoffice testit.ods

WORKAROUND: After opening via the above workaround, copy the entire sheet from testit.ods into a new, blank Calc document, save the document and then one may open via the expected Terminal commands or by double clicking.
Comment 2 Markus Mohrhard 2011-12-21 17:59:23 UTC
Can't reproduce that with an up to date master build, so this will be fixed in 3.5
Comment 3 Colin Law 2012-02-23 06:58:05 UTC
I can confirm that this is fixed in 3.5.0 running in ubuntu 12.04 alpha.