Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add panes splitting, auto filter and selection features. #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

agrech
Copy link

@agrech agrech commented Nov 8, 2015

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.

@VSRonin
Copy link

VSRonin commented Apr 19, 2016

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

rue-ryuzaki added a commit to rue-ryuzaki/QtXlsxWriter that referenced this pull request Nov 29, 2017
@ovenpasta
Copy link

ovenpasta commented May 6, 2021

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:
dtjohnson/xlsx-populate#79

@AndreiCherniaev
Copy link

frozen capabilities have added here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants