-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
setRowStyle function not working #1129
Comments
Thanks for your issue. Please set the style for the cells in the merged range like this: err := xlsx.SetCellStyle("Report", "A1", "Z1", titleStyle) |
Many thanks for the reply. |
Do you plan to resolve this issue in a future release? I noticed that you closed the issue but didn't leave any other comments. |
Correct cells style in merge range Fix incorrect style ID returned on getting cell style in some cases Unit test updated and simplified code
I have fixed it, please upgrade to the master branch code, and this patch will be released in the next version. |
SetRowStyle is not replacing the style of a cell (part of the row) which was previously set using SetCellStyle. For eg. Let's say I have set style to column A using SetColStyle. Now if I set style to row 1 using SetRowStyle, the row style is applied to entire row 1 except cell A1 (col style prevailing here). i.e. SetRowStyle is setting style to only the cells which do not have a previous style. It is not intended, right? |
Hi @eduardo-mior, I also notice that according to the benchmark report of v2.6.0, this fix (commit: |
Hi @eduardo-mior, I have improved performance for the set sheet row and the merging cells on commit |
@xuri I am not sure if this is the same issue (I recently started using the library), however: In the latest v2 release, when I set a row style for 1 row, and then write data into row 2, 3, 4 and so on, the style from row 1 is applied to all rows. I would expect the style to only apply to row 1, not subsequent rows. In master (commit: eed431e), the behavior is as I would have expected - If I set the style for row 1 and then write row 2, the style from row 1 does not apply to row 2. So that is to say, master is working great for me! |
@michaelperel, yep, this issue was caused by an incorrect row compare condition on cell style inheritance in commit |
…tyle Correct cells style in merge range Fix incorrect style ID returned on getting cell style in some cases Unit test updated and simplified code
Ref qax-os#1129, make `SetRowStyle` overwrite style of the cells
…formance, and 1904 date system support - Fix incorrect cell data types casting results when number formatting - Support set cell value on 1904 date system enabled, ref qax-os#1212 - Improve performance for set sheet row and the merging cells, fix performance impact when resolving qax-os#1129
Ref qax-os#1129, make `SetRowStyle` overwrite style of the cells
…formance, and 1904 date system support - Fix incorrect cell data types casting results when number formatting - Support set cell value on 1904 date system enabled, ref qax-os#1212 - Improve performance for set sheet row and the merging cells, fix performance impact when resolving qax-os#1129
…tyle Correct cells style in merge range Fix incorrect style ID returned on getting cell style in some cases Unit test updated and simplified code
Ref qax-os#1129, make `SetRowStyle` overwrite style of the cells
…formance, and 1904 date system support - Fix incorrect cell data types casting results when number formatting - Support set cell value on 1904 date system enabled, ref qax-os#1212 - Improve performance for set sheet row and the merging cells, fix performance impact when resolving qax-os#1129
Description
setRowStyle function not working.
I need to define the style of a line but this is not working in Excel and GoogleSheets, interestingly in LibreOffice Calcs it works.
Code example:
Describe the results you received:
GoogleSheets and Excel:
Describe the results you expected:
LibreOffice:
Output of
go version
:Excelize version or commit ID: 2.5.0
Environment details (OS, Microsoft Excel™ version, physical, etc.):
MacOS Catalina AND Linux Zorion OS
GoogleSheets (online), Libre Office (linux), Excel 2021 (macos from app store)
The text was updated successfully, but these errors were encountered: