relsReader provides a function to get the pointer to the structure after deserialization of relationships parts.
(path string)
| 2064 | // relsReader provides a function to get the pointer to the structure |
| 2065 | // after deserialization of relationships parts. |
| 2066 | func (f *File) relsReader(path string) (*xlsxRelationships, error) { |
| 2067 | rels, _ := f.Relationships.Load(path) |
| 2068 | if rels == nil { |
| 2069 | if _, ok := f.Pkg.Load(path); ok { |
| 2070 | c := xlsxRelationships{} |
| 2071 | if err := f.xmlNewDecoder(bytes.NewReader(namespaceStrictToTransitional(f.readXML(path)))). |
| 2072 | Decode(&c); err != nil && err != io.EOF { |
| 2073 | return nil, err |
| 2074 | } |
| 2075 | f.Relationships.Store(path, &c) |
| 2076 | } |
| 2077 | } |
| 2078 | if rels, _ = f.Relationships.Load(path); rels != nil { |
| 2079 | return rels.(*xlsxRelationships), nil |
| 2080 | } |
| 2081 | return nil, nil |
| 2082 | } |
| 2083 | |
| 2084 | // fillSheetData ensures there are enough rows, and columns in the chosen |
| 2085 | // row to accept data. Missing rows are backfilled and given their row number |