MCPcopy
hub / github.com/qax-os/excelize / relsReader

Method relsReader

sheet.go:2066–2082  ·  view source on GitHub ↗

relsReader provides a function to get the pointer to the structure after deserialization of relationships parts.

(path string)

Source from the content-addressed store, hash-verified

2064// relsReader provides a function to get the pointer to the structure
2065// after deserialization of relationships parts.
2066func (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

Callers 15

getWorkbookPathMethod · 0.95
deleteWorkbookRelsMethod · 0.95
getSheetMapMethod · 0.95
DeleteSheetMethod · 0.95
TestGetPictureFunction · 0.95
TestRelsReaderFunction · 0.95
sharedStringsReaderMethod · 0.95
GetPivotTablesMethod · 0.95
getPivotTableMethod · 0.95

Calls 3

xmlNewDecoderMethod · 0.95
readXMLMethod · 0.95

Tested by 2

TestGetPictureFunction · 0.76
TestRelsReaderFunction · 0.76