- commit
- cebe46425e784fa56867e48c9d3e42bf17dd3372
- parent
- bb438c31e3bfd3ce8e9823cf60c48c320fc57970
- author
- Dami <dami.etoile@gmail.com>
| A | internal/ | 24 | ++++++++++++++++++++++++ |
@@ -0,0 +1,24 @@
1+package sheet2+3+// Loaders (the native file reader, importers of other formats) build a4+// sheet cell by cell and recalculate once at the end.5+6+// Load stores an entry at a with its number format and style, without7+// recalculating or recording undo. With an Automatic format the entry8+// implies one as if typed ("$5" is currency, "9/26/2026" a date). A9+// formula that fails to parse is rejected with a *ParseError and nothing10+// is stored. Call RecalcAll when every cell is in.11+func (s *Sheet) Load(a Addr, input string, f Format, st Style) error {12+ if !a.Valid() {13+ return nil14+ }15+ c, err := newCell(input, f, st, f.IsZero())16+ if err != nil {17+ return err18+ }19+ if c == nil {20+ return nil21+ }22+ s.place(a, c)23+ return nil24+}