Bug 157548 - After exporting a sheet to .CSV file by StoreToUrl(), last rows from the sheet are missing in the .CSV file.
Summary: After exporting a sheet to .CSV file by StoreToUrl(), last rows from the shee...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-01 21:12 UTC by lubomir.kovac
Modified: 2024-04-01 13:29 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lubomir.kovac 2023-10-01 21:12:36 UTC
Description:
After exporting a sheet to .CSV file by StoreToURL(), last rows from the sheet are missing in the .CSV file.
After repeating export with changed number of rows to be exported, exported number rows in target .CSV file is not changing, it is constant.
Macro used for export follows:

sub export_to_CSV()

Dim AAS( 1 ) as New com.sun.star.beans.PropertyValue

AAS( 0 ).Name = "FilterName"
AAS( 0 ).Value = "Text - txt - csv (StarCalc)"
AAS( 1 ).Name = "FilterOptions"
AAS( 1 ).Value = "44,34,0,1,1"

ThisComponent.getCurrentController.setActiveSheet( ThisComponent.Sheets( 0 ) )		
S_file = ConvertToURL( "D:\exported.csv" )
ThisComponent.StoreToURL( S_file, AAS )

end sub


Steps to Reproduce:
1.write a macro for exporting a sheet to a .CSV file
2.write more than 10 rows of some data to the 1st sheet
3.call macro for exporting sheet to .CSV file
4.open .csv file and check some last rows are missing
5.change number of rows in the sheet
6.call macro for exporting sheet to .CSV file
7.open .csv file and number of exported lines in the .CSV file is always the same

Actual Results:
When using StoreToUrl(), number of lines to be exported from the source sheet and number of exported lines in the .CSV file is not the same.

Expected Results:
When using StoreToUrl(), number of lines to be exported from the source sheet and number of exported lines in the .CSV file shold be the same.


Reproducible: Always


User Profile Reset: No

Additional Info:
none
Comment 1 Xisco Faulí 2023-10-02 07:32:55 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 QA Administrators 2024-03-31 03:13:27 UTC Comment hidden (obsolete)
Comment 3 lubomir.kovac 2024-04-01 13:29:41 UTC
It is not possible to create a new file for this bug to appear.