Bug 157745 - Exporting range of cells from sheet to .CSV file doesnt work
Summary: Exporting range of cells from sheet to .CSV file doesnt work
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-13 17:41 UTC by lubomir.kovac
Modified: 2023-10-13 23:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ods file with 2 macros for exporting data from Sheet1 to .csv and .pdf (18.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-10-13 17:45 UTC, lubomir.kovac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lubomir.kovac 2023-10-13 17:41:25 UTC
Description:
When exporting range of cells from sheet to .csv file, the whole sheet is exported instead of the range.
When exporting range of cells from sheet to .pdf file, the range of cells is exported correctly.

Steps to Reproduce:
1. Open file store_cell_range_to_csv.ods
2. Run macro storeCellRangeToCSV()
3. Open file exported.csv and see the contents. The whole sheet is exported instead of range.

Actual Results:
The whole sheet is exported instead of range of cells.

Expected Results:
Only range of cells should be exported.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
When exporting range of cells from sheet to .pdf file, the range of cells is exported correctly.
Comment 1 lubomir.kovac 2023-10-13 17:45:02 UTC
Created attachment 190198 [details]
ods file with 2 macros for exporting data from Sheet1 to .csv and .pdf
Comment 2 m_a_riosv 2023-10-13 23:28:15 UTC
Sorry, but it is how it works, for CSV the whole sheet it's exported.

There is an extension, which I have not tested.
https://extensions.libreoffice.org/en/extensions/show/creating-a-csv-file-from-the-scope-of-data