QtXlsxWriter
QtXlsxWriter copied to clipboard
Add panes splitting, auto filter and selection features.
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.
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
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