-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtest-wb_styles.R
473 lines (366 loc) · 17.4 KB
/
test-wb_styles.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
test_that("wb_clone_sheet_style", {
fl <- system.file("extdata", "oxlsx2_sheet.xlsx", package = "openxlsx2")
wb <- wb_load(fl)$clone_worksheet("SUM", "clone")
wb <- wb$clean_sheet(sheet = "clone", numbers = TRUE, characters = TRUE, styles = TRUE, merged_cells = FALSE)
wb <- wb_clone_sheet_style(wb, "SUM", "clone")
expect_warning(cloneSheetStyle(wb, "SUM", "clone"), "deprecated")
# clone style to empty sheet (creates cells and style)
fl <- system.file("extdata", "oxlsx2_sheet.xlsx", package = "openxlsx2")
wb <- wb_load(fl)$add_worksheet("copy")
wb <- wb_clone_sheet_style(wb, "SUM", "copy")
expect_equal(dim(wb$worksheets[[1]]$sheet_data$cc),
dim(wb$worksheets[[1]]$sheet_data$cc))
expect_equal(dim(wb$worksheets[[1]]$sheet_data$row_attr),
dim(wb$worksheets[[2]]$sheet_data$row_attr))
# clone style to sheet with data
fl <- system.file("extdata", "oxlsx2_sheet.xlsx", package = "openxlsx2")
wb <- wb_load(fl)$add_worksheet("copy")$add_data(x = mtcars, startRow = 5, startCol = 2)
wb <- wb_clone_sheet_style(wb, "SUM", "copy")
expect_equal(c(36, 13), dim(wb$worksheets[[2]]$sheet_data$row_attr))
# clone style on cloned and cleaned worksheet
fl <- system.file("extdata", "oxlsx2_sheet.xlsx", package = "openxlsx2")
wb <- wb_load(fl)$clone_worksheet("SUM", "clone")
wb <- wb$clean_sheet(sheet = "clone", numbers = TRUE, characters = TRUE, styles = TRUE, merged_cells = FALSE)
wb <- wb_clone_sheet_style(wb, "SUM", "clone")
# sort for this test, does not matter later, because we will sort prior to saving
ord <- match(
wb$worksheets[[1]]$sheet_data$cc$r,
wb$worksheets[[2]]$sheet_data$cc$r
)
expect_equal(
wb$worksheets[[1]]$sheet_data$cc$c_s,
wb$worksheets[[2]]$sheet_data$cc$c_s[ord]
)
# output if copying from empty sheet
fl <- system.file("extdata", "oxlsx2_sheet.xlsx", package = "openxlsx2")
wb <- wb_load(fl)$add_worksheet("copy")
expect_message(
expect_message(
wb <- wb_clone_sheet_style(wb, "copy", "SUM"),
"'from' has no sheet data styles to clone"
),
"'from' has no row styles to clone"
)
})
test_that("test add_border()", {
wb <- wb_workbook()
wb$add_worksheet("S1")$add_data("S1", mtcars)
expect_silent(wb$add_border(1, dims = "A1:K1", left_border = NULL, right_border = NULL, top_border = NULL, bottom_border = "double"))
# check xf
exp <- c("<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>",
"<xf applyBorder=\"1\" borderId=\"1\" fillId=\"0\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"/>",
"<xf applyBorder=\"1\" borderId=\"2\" fillId=\"0\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"/>",
"<xf applyBorder=\"1\" borderId=\"3\" fillId=\"0\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"/>"
)
got <- wb$styles_mgr$styles$cellXfs
expect_equal(exp, got)
# check borders
exp <- c("<border><left/><right/><top/><bottom/><diagonal/></border>",
"<border><left><color rgb=\"FF000000\"/></left><right/><top><color rgb=\"FF000000\"/></top><bottom style=\"double\"><color rgb=\"FF000000\"/></bottom><diagonal/></border>",
"<border><left/><right><color rgb=\"FF000000\"/></right><top><color rgb=\"FF000000\"/></top><bottom style=\"double\"><color rgb=\"FF000000\"/></bottom><diagonal/></border>",
"<border><left/><right/><top><color rgb=\"FF000000\"/></top><bottom style=\"double\"><color rgb=\"FF000000\"/></bottom><diagonal/></border>"
)
got <- wb$styles_mgr$styles$borders
expect_equal(exp, got)
wb <- wb_workbook()
wb$add_worksheet("S1")$add_border(1, dims = "A1:K1", left_border = NULL, right_border = NULL, top_border = NULL, bottom_border = "double")
exp <- c("1", "3", "3", "3", "3", "3", "3", "3", "3", "3", "2")
got <- wb$worksheets[[1]]$sheet_data$cc$c_s
expect_equal(exp, got)
})
test_that("test add_fill()", {
wb <- wb_workbook()
wb$add_worksheet("S1")$add_data("S1", mtcars)
expect_silent(wb$add_fill("S1", dims = "D5:G6", color = wb_colour(hex = "FFFFFF00")))
# check xf
exp <- c("<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>",
"<xf applyFill=\"1\" borderId=\"0\" fillId=\"2\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"/>"
)
got <- wb$styles_mgr$styles$cellXfs
expect_equal(exp, got)
# check fill
exp <- c("<fill><patternFill patternType=\"none\"/></fill>",
"<fill><patternFill patternType=\"gray125\"/></fill>",
"<fill><patternFill patternType=\"solid\"><fgColor rgb=\"FFFFFF00\"/></patternFill></fill>"
)
got <- wb$styles_mgr$styles$fills
expect_equal(exp, got)
# every_nth_col/row
wb <- wb_workbook()
wb$add_worksheet("S1", gridLines = FALSE)$add_data("S1", matrix(1:20, 4, 5))
wb$add_fill("S1", dims = "A1:E6", color = wb_colour(hex = "FFFFFF00"), every_nth_col = 2)
wb$add_fill("S1", dims = "A1:E6", color = wb_colour(hex = "FF00FF00"), every_nth_row = 2)
exp <- c("<fill><patternFill patternType=\"none\"/></fill>",
"<fill><patternFill patternType=\"gray125\"/></fill>",
"<fill><patternFill patternType=\"solid\"><fgColor rgb=\"FFFFFF00\"/></patternFill></fill>",
"<fill><patternFill patternType=\"solid\"><fgColor rgb=\"FF00FF00\"/></patternFill></fill>"
)
got <- wb$styles_mgr$styles$fills
expect_equal(exp, got)
exp <- c("<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>",
"<xf applyFill=\"1\" borderId=\"0\" fillId=\"2\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"/>",
"<xf applyFill=\"1\" borderId=\"0\" fillId=\"3\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"/>")
got <- wb$styles_mgr$styles$cellXfs
expect_equal(exp, got)
# check the actual styles
exp <- c("", "1", "", "1", "", "2", "2", "2", "2", "2", "", "1", "",
"1", "", "2", "2", "2", "2", "2", "", "1", "", "1", "", "2",
"2", "2", "2", "2")
got <- wb$worksheets[[1]]$sheet_data$cc$c_s
expect_equal(exp, got)
wb <- wb_workbook()
wb$add_worksheet("S1")$add_fill("S1", dims = "D5:G6", color = wb_colour(hex = "FFFFFF00"))
exp <- rep("1", 8)
got <- wb$worksheets[[1]]$sheet_data$cc$c_s
expect_equal(exp, got)
})
test_that("test add_font()", {
wb <- wb_workbook()
wb$add_worksheet("S1")$add_data("S1", mtcars)
expect_silent(wb$add_font("S1", dims = "A1:K1", color = wb_colour(hex = "FFFFFF00")))
# check xf
exp <- c(
"<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>",
"<xf applyFont=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"1\" numFmtId=\"0\" xfId=\"0\"/>"
)
got <- wb$styles_mgr$styles$cellXfs
expect_equal(exp, got)
# check font
exp <- c(
"<font><sz val=\"11\"/><color theme=\"1\"/><name val=\"Calibri\"/><family val=\"2\"/><scheme val=\"minor\"/></font>",
"<font><color rgb=\"FFFFFF00\"/><name val=\"Calibri\"/><sz val=\"11\"/></font>"
)
got <- wb$styles_mgr$styles$fonts
expect_equal(exp, got)
# check the actual styles
exp <- c("1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "",
"", "", "", "", "", "", "", "")
got <- head(wb$worksheets[[1]]$sheet_data$cc$c_s, 20)
expect_equal(exp, got)
wb <- wb_workbook()
wb$add_worksheet("S1")$add_font("S1", dims = "A1:K1", color = wb_colour(hex = "FFFFFF00"))
exp <- rep("1", 11)
got <- wb$worksheets[[1]]$sheet_data$cc$c_s
expect_equal(exp, got)
})
test_that("test add_numfmt()", {
wb <- wb_workbook()
wb$add_worksheet("S1")$add_data("S1", mtcars)
expect_silent(wb$add_numfmt("S1", dims = "A1:A33", numfmt = 2))
expect_silent(wb$add_numfmt("S1", dims = "F1:F33", numfmt = "#.0"))
# check xf
exp <- c("<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>",
"<xf applyNumberFormat=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"0\" numFmtId=\"2\" xfId=\"0\"/>",
"<xf applyNumberFormat=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"0\" numFmtId=\"165\" xfId=\"0\"/>"
)
got <- wb$styles_mgr$styles$cellXfs
expect_equal(exp, got)
# check numfmt
exp <- "<numFmt numFmtId=\"165\" formatCode=\"#.0\"/>"
got <- wb$styles_mgr$styles$numFmts
expect_equal(exp, got)
# check the actual styles
exp <- c("1", "", "", "", "", "2", "", "", "", "", "", "1", "", "",
"", "", "2", "", "", "")
got <- head(wb$worksheets[[1]]$sheet_data$cc$c_s, 20)
expect_equal(exp, got)
wb <- wb_workbook()
wb$add_worksheet("S1")$add_numfmt("S1", dims = "A1:A33", numfmt = 2)
exp <- rep("1", 33)
got <- wb$worksheets[[1]]$sheet_data$cc$c_s
expect_equal(exp, got)
})
test_that("test add_cell_style()", {
wb <- wb_workbook()
wb$add_worksheet("S1")$add_data("S1", mtcars)
expect_silent(wb$add_cell_style("S1", dims = "A1:A33", textRotation = "45"))
expect_silent(wb$add_cell_style("S1", dims = "F1:F33", horizontal = "center"))
# check xf
exp <- c("<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>",
"<xf borderId=\"0\" fillId=\"0\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"><alignment textRotation=\"45\"/></xf>",
"<xf borderId=\"0\" fillId=\"0\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"><alignment horizontal=\"center\"/></xf>"
)
got <- wb$styles_mgr$styles$cellXfs
expect_equal(exp, got)
# check the actual styles
exp <- c("1", "", "", "", "", "2", "", "", "", "", "", "1", "", "",
"", "", "2", "", "", "")
got <- head(wb$worksheets[[1]]$sheet_data$cc$c_s, 20)
expect_equal(exp, got)
wb <- wb_workbook()
wb$add_worksheet("S1")$add_cell_style("S1", dims = "A1:A33", textRotation = "45")
exp <- rep("1", 33)
got <- wb$worksheets[[1]]$sheet_data$cc$c_s
expect_equal(exp, got)
###
exp <- "<xf applyAlignment=\"1\" applyBorder=\"1\" applyFill=\"1\" applyFont=\"1\" applyNumberFormat=\"1\" applyProtection=\"1\" borderId=\"1\" fillId=\"1\" fontId=\"1\" numFmtId=\"1\" pivotButton=\"0\" quotePrefix=\"0\" xfId=\"1\"><alignment horizontal=\"1\" indent=\"1\" justifyLastLine=\"1\" readingOrder=\"1\" relativeIndent=\"1\" shrinkToFit=\"1\" textRotation=\"1\" vertical=\"1\" wrapText=\"1\"/><extLst extLst=\"1\"/><protection hidden=\"1\" locked=\"1\"/></xf>"
got <- create_cell_style(
borderId = "1",
fillId = "1",
fontId = "1",
numFmtId = "1",
pivotButton = "0",
quotePrefix = "0",
xfId = "1",
horizontal = "1",
indent = "1",
justifyLastLine = "1",
readingOrder = "1",
relativeIndent = "1",
shrinkToFit = "1",
textRotation = "1",
vertical = "1",
wrapText = "1",
extLst = "1",
hidden = "1",
locked = "1"
)
expect_equal(exp, got)
})
test_that("add_style", {
# without name
num <- create_numfmt(numFmtId = "165", formatCode = "#.#")
wb <- wb_workbook() %>% wb_add_style(num)
exp <- num
got <- wb$styles_mgr$styles$numFmts
expect_equal(exp, got)
exp <- structure(list(typ = "numFmt", id = "165", name = "num"),
row.names = c(NA, -1L),
class = "data.frame")
got <- wb$styles_mgr$numfmt
expect_equal(exp, got)
# with name
wb <- wb_workbook() %>% wb_add_style(num, "num")
exp <- num
got <- wb$styles_mgr$styles$numFmts
expect_equal(exp, got)
exp <- structure(list(typ = "numFmt", id = "165", name = "num"),
row.names = c(NA, -1L),
class = "data.frame")
got <- wb$styles_mgr$numfmt
expect_equal(exp, got)
})
test_that("assigning styles to loaded workbook works", {
wb <- wb_load(file = system.file("extdata", "oxlsx2_sheet.xlsx", package = "openxlsx2"))
# previously it would break on xml_import, because NA was returned
expect_silent(wb$add_font()$add_font())
})
test_that("get & set cell style(s)", {
# set a style in b1
wb <- wb_workbook()$add_worksheet()$
add_numfmt(dims = "B1", numfmt = "#,0")
# get style from b1 to assign it to a1
numfmt <- wb$get_cell_style(dims = "B1")
expect_equal("1", numfmt)
# assign style to a1
pre <- wb$get_cell_style(dims = "A1")
expect_equal("", pre)
expect_silent(wb$set_cell_style(dims = "A1", style = numfmt))
post <- wb$get_cell_style(dims = "A1")
expect_equal("1", post)
s_a1_b1 <- wb$get_cell_style(dims = "A1:B1")
expect_silent(wb$set_cell_style(dims = "A2:B2", style = s_a1_b1))
s_a2_b2 <- wb$get_cell_style(dims = "A2:B2")
expect_equal(s_a1_b1, s_a2_b2)
})
test_that("get_cell_styles()", {
wb <- wb_workbook()$
add_worksheet(gridLines = FALSE)$
# add title
add_data(dims = "B2", x = "MTCARS Title")$
add_font(dims = "B2", bold = "1", size = "16")$ # style 1
# add data
add_data(x = head(mtcars), startCol = 2, startRow = 3)$
add_fill(dims = "B3:L3", color = wb_colour("turquoise"))$ # style 2 unused
add_font(dims = "B3:L3", color = wb_colour("white"))$ # style 3
add_border(dims = "B9:L9",
bottom_color = wb_colour(hex = "FF000000"),
bottom_border = "thin",
left_border = "",
right_border = "",
top_border = "")
exp <- "1"
got <- wb$get_cell_style(dims = "B2")
expect_equal(exp, got)
exp <- "<xf applyFont=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"1\" numFmtId=\"0\" xfId=\"0\"/>"
got <- get_cell_styles(wb, 1, "B2")
expect_equal(exp, got)
exp <- "3"
got <- wb$get_cell_style(dims = "B3")
expect_equal(exp, got)
exp <- "<xf applyFill=\"1\" applyFont=\"1\" borderId=\"0\" fillId=\"2\" fontId=\"2\" numFmtId=\"0\" xfId=\"0\"/>"
got <- get_cell_styles(wb, 1, "B3")
expect_equal(exp, got)
wb$add_cell_style(dims = "B3:L3",
textRotation = "45",
horizontal = "center",
vertical = "center",
wrapText = "1")
exp <- "<xf applyFill=\"1\" applyFont=\"1\" borderId=\"0\" fillId=\"2\" fontId=\"2\" numFmtId=\"0\" xfId=\"0\"><alignment horizontal=\"center\" textRotation=\"45\" vertical=\"center\" wrapText=\"1\"/></xf>"
got <- get_cell_styles(wb, 1, "B3")
expect_equal(exp, got)
})
test_that("applyCellStyle works", {
wb <- wb_workbook()$
add_worksheet()$
add_fill(dims = "B2:G8", color = wb_colour("yellow"))$
add_data(dims = "C3", x = Sys.Date())$
add_data(dims = "E3", x = Sys.Date(), applyCellStyle = FALSE)$
add_data(dims = "E5", x = Sys.Date(), removeCellStyle = TRUE)$
add_data(dims = "A1", x = Sys.Date())
cc <- wb$worksheets[[1]]$sheet_data$cc
exp <- c("3", "2", "1", "3")
got <- cc[cc$r %in% c("A1", "C3", "E3", "E5"), "c_s"]
expect_equal(exp, got)
})
test_that("style names are xml", {
sheet <- mtcars[1:6, 1:6]
wb <- wb_workbook() %>%
wb_add_worksheet("test") %>%
wb_add_data(x = "Title", startCol = 1, startRow = 1) %>%
wb_add_font(dims = "A1", bold = "1", size = "14") %>%
wb_add_data(x = sheet, colNames = TRUE, startCol = 1, startRow = 2, removeCellStyle = TRUE) %>%
wb_add_cell_style(dims = "B2:F2", horizontal = "right") %>%
wb_add_font(dims = "A2:F2", bold = "1", size = "11") %>%
wb_add_numfmt(dims = "B3:D8", numfmt = 2) %>%
wb_add_font(dims = "B3:D8", italic = "1", size = "11") %>%
wb_add_fill(dims = "B3:D8", color = wb_colour("orange")) %>%
wb_add_fill(dims = "C5", color = wb_colour("black")) %>%
wb_add_font(dims = "C5", color = wb_colour("white"))
exp <- list(
numFmts = NULL,
fonts = c(
"<font><sz val=\"11\"/><color theme=\"1\"/><name val=\"Calibri\"/><family val=\"2\"/><scheme val=\"minor\"/></font>",
"<font><b val=\"1\"/><color rgb=\"FF000000\"/><name val=\"Calibri\"/><sz val=\"14\"/></font>",
"<font><b val=\"1\"/><color rgb=\"FF000000\"/><name val=\"Calibri\"/><sz val=\"11\"/></font>",
"<font><color rgb=\"FF000000\"/><i val=\"1\"/><name val=\"Calibri\"/><sz val=\"11\"/></font>",
"<font><color rgb=\"FFFFFFFF\"/><name val=\"Calibri\"/><sz val=\"11\"/></font>"
),
fills = c(
"<fill><patternFill patternType=\"none\"/></fill>",
"<fill><patternFill patternType=\"gray125\"/></fill>", "<fill><patternFill patternType=\"solid\"><fgColor rgb=\"FFFFA500\"/></patternFill></fill>",
"<fill><patternFill patternType=\"solid\"><fgColor rgb=\"FF000000\"/></patternFill></fill>"
),
borders = "<border><left/><right/><top/><bottom/><diagonal/></border>",
cellStyleXfs = "<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\"/>",
cellXfs = c(
"<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>",
"<xf applyFont=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"1\" numFmtId=\"0\" xfId=\"0\"/>",
"<xf borderId=\"0\" fillId=\"0\" fontId=\"0\" numFmtId=\"0\" xfId=\"0\"><alignment horizontal=\"right\"/></xf>",
"<xf applyFont=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"2\" numFmtId=\"0\" xfId=\"0\"/>",
"<xf applyFont=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"2\" numFmtId=\"0\" xfId=\"0\"><alignment horizontal=\"right\"/></xf>",
"<xf applyNumberFormat=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"0\" numFmtId=\"2\" xfId=\"0\"/>",
"<xf applyFont=\"1\" applyNumberFormat=\"1\" borderId=\"0\" fillId=\"0\" fontId=\"3\" numFmtId=\"2\" xfId=\"0\"/>",
"<xf applyFill=\"1\" applyFont=\"1\" applyNumberFormat=\"1\" borderId=\"0\" fillId=\"2\" fontId=\"3\" numFmtId=\"2\" xfId=\"0\"/>",
"<xf applyFill=\"1\" applyFont=\"1\" applyNumberFormat=\"1\" borderId=\"0\" fillId=\"3\" fontId=\"3\" numFmtId=\"2\" xfId=\"0\"/>",
"<xf applyFill=\"1\" applyFont=\"1\" applyNumberFormat=\"1\" borderId=\"0\" fillId=\"3\" fontId=\"4\" numFmtId=\"2\" xfId=\"0\"/>"
),
cellStyles = "<cellStyle name=\"Normal\" xfId=\"0\" builtinId=\"0\"/>",
dxfs = NULL,
tableStyles = NULL,
indexedColors = NULL,
extLst = NULL
)
got <- wb$styles_mgr$styles
expect_equal(exp, got)
})