QtXlsxWriter icon indicating copy to clipboard operation
QtXlsxWriter copied to clipboard

Add panes splitting, auto filter and selection features.

Open agrech opened this issue 9 years ago • 3 comments

Add worksheet pane splitting features with methods: * freezePane() : Create panes and mark them as frozen in worksheet's spreadsheetML. * splitPane(): Create panes and mark them as split in worksheet's spreadsheetML. Auto filter feature: * setAutoFilter(): Mark a range of cells for auto filtering. Selection feature: * setSelection(): Select a cell range and activate a cell for a pane in a worksheet.

Existing panes, auto filter and selections will also be imported on opening an existing xlsx file.

agrech avatar Nov 08 '15 12:11 agrech

As the author is not active any more, please submit your pull request to https://github.com/VSRonin/QtXlsxWriter I'll take care of maintaining code until the author is back

VSRonin avatar Apr 19 '16 09:04 VSRonin

I know this is old, but for the auto filter to work you will need to add this:

bool Worksheet::setAutoFilter(const CellRange &range)
{
	Q_D(Worksheet);
	if (!d->autoFilter) {
		d->autoFilter = new XlsxAutoFilter;
	}
	d->workbook->defineName("_xlnm._FilterDatabase",QString("'%1'!").arg(sheetName().replace("'","''"))
							+range.toString(true,true),
							"",
							sheetName()) ;
	d->autoFilter->ref = range;
	return true;
}

for reference: https://github.com/dtjohnson/xlsx-populate/issues/79

ovenpasta avatar May 06 '21 16:05 ovenpasta