Bug Hunting Session
Bug 127675 - Pasting only 65536 rows to Calc from Excel
Summary: Pasting only 65536 rows to Calc from Excel
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: Paste-From-MSO
  Show dependency treegraph
 
Reported: 2019-09-20 16:55 UTC by Roman Kuznetsov
Modified: 2019-09-21 07:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example XLSX with 100000 rows with data (817.30 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-09-20 16:56 UTC, Roman Kuznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2019-09-20 16:55:36 UTC
Description:
Pasting only 65536 rows to Calc from Excel

possible a problem with selecting of right format for pasting from clipboard in LibreOffice Calc

Steps to Reproduce:
1. Open XLSX file from attach
2. Copy cell range A1:A100000
3. Try paste it into Calc => will be paste only 65536 rows instead of all 100000


Actual Results:
Pasting only 65536 rows to Calc from Excel

Expected Results:
Pasting all data from Excel to Calc


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.0.0.alpha0+ (x64)
Build ID: 06925c1230cd6269fa5189ac3f4d608c9edf68e9
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-09-17_00:45:28
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 1 Roman Kuznetsov 2019-09-20 16:56:36 UTC
Created attachment 154330 [details]
Example XLSX with 100000 rows with data
Comment 2 Roman Kuznetsov 2019-09-20 16:58:14 UTC
Open file from attach in Excel of course =(
Comment 3 Mike Kaganski 2019-09-20 17:12:20 UTC
Excel (tested with ver.2016) stores these formats to clipboard:

CF_TEXT
CF_BITMAP
CF_METAFILEPICT
CF_SYLK
CF_DIN
CF_UNICODETEXT
CF_ENHMETAFILE
Embed Source
Link Source
Object Descriptor
Link Source Descriptor
HTML Format
Rich Text Format
Hyperlink
Csv
Link
Biff8
Biff5
XML Spreadsheet
Biff12

The Biff8 is what is chosen by Calc when pasting (see ScViewFunc::PasteFromSystem()). It is a format that is limited to 256 columns and 65536 rows, hence it can't contain everything that Excel is capable to store to clipboard (Biff5 has the same constraints). "XML Spreadsheet" format seems to be the Excel 2003 XML format; and Biff12 is "Excel Binary Workbook" (.xlsb), which is the format supported by LibreOffice (read-only) and doesn't have the limitation of the older Biff formats.

The Biff8 clipboard format support was added in commit https://git.libreoffice.org/core/+/f5412bb121481cf1e48af4d6dc10674bec6c095c.

Adding "easyhack" keyword.
Comment 4 Mike Kaganski 2019-09-20 17:24:16 UTC
So the idea is to add the Biff12 Clipboard format support, which would take precedence over the other two Biff formats on import.