@@ -27,36 +27,6 @@ module Codec.Xlsx.Types
27
27
28
28
-- * Lenses
29
29
30
- -- ** Workbook
31
- xlSheets ,
32
- xlStyles ,
33
- xlDefinedNames ,
34
- xlCustomProperties ,
35
- xlDateBase ,
36
-
37
- -- ** Worksheet
38
- wsColumnsProperties ,
39
- wsRowPropertiesMap ,
40
- wsCells ,
41
- wsDrawing ,
42
- wsMerges ,
43
- wsSheetViews ,
44
- wsPageSetup ,
45
- wsConditionalFormattings ,
46
- wsDataValidations ,
47
- wsPivotTables ,
48
- wsAutoFilter ,
49
- wsTables ,
50
- wsProtection ,
51
- wsSharedFormulas ,
52
- wsState ,
53
-
54
- -- ** Cells
55
- Cell. cellValue ,
56
- Cell. cellStyle ,
57
- Cell. cellComment ,
58
- Cell. cellFormula ,
59
-
60
30
-- ** Row properties
61
31
rowHeightLens ,
62
32
_CustomHeight ,
@@ -285,50 +255,48 @@ instance ToAttrVal SheetState where
285
255
-- | Xlsx worksheet
286
256
data Worksheet = Worksheet
287
257
{ -- | column widths
288
- _wsColumnsProperties :: [ColumnsProperties ],
258
+ wsColumnsProperties :: [ColumnsProperties ],
289
259
-- | custom row properties (height, style) map
290
- _wsRowPropertiesMap :: Map RowIndex RowProperties ,
260
+ wsRowPropertiesMap :: Map RowIndex RowProperties ,
291
261
-- | data mapped by (row, column) pairs
292
- _wsCells :: CellMap ,
262
+ wsCells :: CellMap ,
293
263
-- | SpreadsheetML Drawing
294
- _wsDrawing :: Maybe Drawing ,
264
+ wsDrawing :: Maybe Drawing ,
295
265
-- | list of cell merges
296
- _wsMerges :: [Range ],
297
- _wsSheetViews :: Maybe [SheetView ],
298
- _wsPageSetup :: Maybe PageSetup ,
299
- _wsConditionalFormattings :: Map SqRef ConditionalFormatting ,
300
- _wsDataValidations :: Map SqRef DataValidation ,
301
- _wsPivotTables :: [PivotTable ],
302
- _wsAutoFilter :: Maybe AutoFilter ,
303
- _wsTables :: [Table ],
304
- _wsProtection :: Maybe SheetProtection ,
305
- _wsSharedFormulas :: Map SharedFormulaIndex SharedFormulaOptions ,
306
- _wsState :: SheetState
266
+ wsMerges :: [Range ],
267
+ wsSheetViews :: Maybe [SheetView ],
268
+ wsPageSetup :: Maybe PageSetup ,
269
+ wsConditionalFormattings :: Map SqRef ConditionalFormatting ,
270
+ wsDataValidations :: Map SqRef DataValidation ,
271
+ wsPivotTables :: [PivotTable ],
272
+ wsAutoFilter :: Maybe AutoFilter ,
273
+ wsTables :: [Table ],
274
+ wsProtection :: Maybe SheetProtection ,
275
+ wsSharedFormulas :: Map SharedFormulaIndex SharedFormulaOptions ,
276
+ wsState :: SheetState
307
277
}
308
278
deriving (Eq , Show , Generic )
309
279
310
280
instance NFData Worksheet
311
281
312
- makeLenses ''Worksheet
313
-
314
282
instance Default Worksheet where
315
283
def =
316
284
Worksheet
317
- { _wsColumnsProperties = [] ,
318
- _wsRowPropertiesMap = M. empty,
319
- _wsCells = M. empty,
320
- _wsDrawing = Nothing ,
321
- _wsMerges = [] ,
322
- _wsSheetViews = Nothing ,
323
- _wsPageSetup = Nothing ,
324
- _wsConditionalFormattings = M. empty,
325
- _wsDataValidations = M. empty,
326
- _wsPivotTables = [] ,
327
- _wsAutoFilter = Nothing ,
328
- _wsTables = [] ,
329
- _wsProtection = Nothing ,
330
- _wsSharedFormulas = M. empty,
331
- _wsState = def
285
+ { wsColumnsProperties = [] ,
286
+ wsRowPropertiesMap = M. empty,
287
+ wsCells = M. empty,
288
+ wsDrawing = Nothing ,
289
+ wsMerges = [] ,
290
+ wsSheetViews = Nothing ,
291
+ wsPageSetup = Nothing ,
292
+ wsConditionalFormattings = M. empty,
293
+ wsDataValidations = M. empty,
294
+ wsPivotTables = [] ,
295
+ wsAutoFilter = Nothing ,
296
+ wsTables = [] ,
297
+ wsProtection = Nothing ,
298
+ wsSharedFormulas = M. empty,
299
+ wsState = def
332
300
}
333
301
334
302
-- | Raw worksheet styles, for structured implementation see 'StyleSheet'
@@ -340,15 +308,15 @@ instance NFData Styles
340
308
341
309
-- | Structured representation of Xlsx file (currently a subset of its contents)
342
310
data Xlsx = Xlsx
343
- { _xlSheets :: [(Text , Worksheet )],
344
- _xlStyles :: Styles ,
345
- _xlDefinedNames :: DefinedNames ,
346
- _xlCustomProperties :: Map Text Variant ,
311
+ { xlSheets :: [(Text , Worksheet )],
312
+ xlStyles :: Styles ,
313
+ xlDefinedNames :: DefinedNames ,
314
+ xlCustomProperties :: Map Text Variant ,
347
315
-- | date base to use when converting serial value (i.e. 'CellDouble d')
348
316
-- into date-time. Default value is 'DateBase1900'
349
317
--
350
318
-- See also 18.17.4.1 "Date Conversion for Serial Date-Times" (p. 2067)
351
- _xlDateBase :: DateBase
319
+ xlDateBase :: DateBase
352
320
}
353
321
deriving (Eq , Show , Generic )
354
322
@@ -380,8 +348,6 @@ newtype DefinedNames = DefinedNames [(Text, Maybe Text, Text)]
380
348
381
349
instance NFData DefinedNames
382
350
383
- makeLenses ''Xlsx
384
-
385
351
instance Default Xlsx where
386
352
def = Xlsx [] emptyStyles def M. empty DateBase1900
387
353
0 commit comments