Save Calc CSV as Displayed Ignoring Hidden Rows and Columns

File, Save as, Text CSV with Edit filter settings, Save cell content as shown, Quote all text cells saves hidden cells. Is there any way to ignore hidden rows and columns?

(Selecting fixed column width ignores zero-width columns but is not really csv.)


It seems a bug for Save cell content as shown given hidden or no-height rows and columns are not shown -

This macro will do copy of the active sheet and in this copy it removes the hidden rows or rows with zero height, and then it removes the hidden columns or columns with zero width.

Sub copyOnlyVisibleCells 'it do copy of active sheet and remove from this copy the hidden rows/columns and rows/columns with zero width/height
	dim oDoc as object, oSheets as object, oSheet as object, oCur as object, i&, o as object
	s=oSheet.Name & "-COPY" 'name of copied sheet
	oSheets.copyByName(oSheet.Name, s, oSheets.Count)
	oSheet=oSheets.getbyName(s) 'copied sheet
	for i=0 to oCur.RangeAddress.EndRow 'remove hidden or no-height rows
		if o.isVisible=false OR o.Height=0 then
			oSheet.Rows.removeByIndex(i, 1)
		end if
	next i
	for i=0 to oCur.RangeAddress.EndColumn 'remove hidden or no-width columns
		if o.isVisible=false OR o.Width=0 then
			oSheet.Columns.removeByIndex(i, 1)
		end if		
	next i
End Sub