-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
More work to do in XML reader #3568
Comments
You can start by identifying what you think is missing/buggy. I think you can just add it to this ticket or 3566. Sample spreadsheet(s) demonstrating the problems would be especially helpful. |
Ok, let's start with two bugs:
IMO should be
because the attribute is allowed to be 0 (even though Excel normally would not generate that). Same thing for italic of course. oleibman - Fixed in most recent push. |
ExcelWorkbook/ActiveSheet should make the respective sheet active (starting with 0). I achieved this by reading the value first and using:
after all the sheets are there. oleibman - fixed in most recent push. |
Worksheet[Protected] is used to protect the worksheet (unless overwritten by specific styles). This seems to be what
is doing. oleibman - included in latest push. |
Column[Span] is used to define a bunch of columns at once (1 for 1+1=2 oleibman - fixed in latest push. |
Style/Protection is used to protect and/or hide formulas. This corresponds 1:1 to the mechanism defined in Style/Protection::locked and Style/Protection::hidden. oleibman - fixed in latest push. |
WorksheetOptions/TopRowVisible and WorksheetOptions/LeftColumnVisible define the top-left position when the sheet is opened (0-based). I could not find a method to achieve this in PhpSpreadsheet yet. oleibman - This is now supported in latest push. |
WorksheetOptions/SplitHorizontal These control a split display, but they require the presence of FreezePanes and FrozenNoSplit, which I am not totally sure about; they might refer to split modes and menu items no longer present in modern Excel. ActivePane selects the active pane when the sheet is opened; the numbering is odd and explained in http://m8y.org/Microsoft_Office_2003_XML_Reference_Schemas/Help/html/spreadsheetml_HV01151864.htm I don't really understand the Panes-section; I added it just as a reference what else might be possible here. |
You missed the setting of selected cells for each worksheet. I have added that in the latest push. I will not be adding SplitHorizontal and its 4 associated items to my PR; it will need a lot more research. Please open a new issue if you wish to proceed with them. There are still a couple of items I have not yet addressed in those tickets. I'll decide tomorrow if I want to bundle those with what I've already changed, or if they will require a separate issue. |
This is far more - and faster - than I dared to think of. I am using SplitHorizontal in my sheets quite often, but I'll have another look at that myself first. There are even more interesting things (DataValidation), but lets make one step after the other. |
I think my PR is now in its final state. Please open a separate ticket for Column Span. I don't really understand what it's trying to accomplish. I think the fact that your example hides the spanned columns is at least in part responsible for my lack of understanding. Please give an example (in the new ticket) which shows everything and which doesn't use protection. |
This is:
After submitting #3566 I realized that there is a bunch of other options not yet implemented as well. (I generate XML-spreadsheets from templates, but now want to deliver xlsx-files upon user request; the templates should stay due to their convenience).
So far I integrated:
ExcelWorkbook/ActiveSheet,
Worksheet[Protected],
Column[Span],
Worksheet/WorksheetOptions/TopRowBottomPane,
Worksheet/WorksheetOptions/LeftColumnRightPane,
Style/Protection
and fixed a bug with Style/Font[bold] and Style/Font[Italic],
but there is more work to do, and often I do not know how to get the desired behavior in PhpSpreadsheet. My reference is http://m8y.org/Microsoft_Office_2003_XML_Reference_Schemas/Help/html/spreadsheetml_HV01151864.htm, and I try to integrate at least everything I am using. How could we proceed here - I'd need someone familiar with PhpSpreadsheet which I am definitely not.
The text was updated successfully, but these errors were encountered: