【功能概述】
BRCM很多功能都需要进行excel文件的导入,而这些文件从头开始编辑并创建其配置文件又十分费时费力;
本贴提供了BRCM常用的导入导出excel文件及其对应的配置文件~
【功能详解】
1.电缆清册导入文件及其配置文件:
cable list.xls
<?xml version="1.0" encoding="utf-8"?> <!-- substr(<variable for result>, <absolute/relative start position>) substr(<variable for result>, <absolute/relative start position>, absolute/relative end position/additional substring length) absolute position: 0, 5,... relative position: 1x'.'+1 = first occurance of '.' plus one char 2x' - '+3 = second occurance of ' - ' plus three chars r1x'-'-1 = first '-' backwards (last '-') minus one char additional substring length: +0 = no additional length = just the char at the start position +3 = start position plus three chars = length 4 sbustr with only two parameters retrieves substring from start position until and including last character format_xtr (extraction format): sbustring or absolute value format_pub (publish format) : [prefix]($<result variable of format_xtr>)[suffix] mandatory: <1||yes||true||on> || <0||no||false||off> --> <XLImportSheet version="0.1" created_by="oh" company="HASOFT"> <Sheets> <Sheet number="1" name="" line_start="3" line_stop="500" col_start="A" col_end="Z" /> </Sheets> <condition name="voltage_level" xl_col="F" format_xtr="X" format_pub="($X)"> <variable name="tree_id" condition_value="LV" value="0001" /> <variable name="tree_id" condition_value="MV" value="0002" /> <variable name="tree_id" condition_value="CTRL" value="0003" /> <variable name="tree_id" condition_value="IW" value="0004" /> <variable name="tree_id" condition_value="COM" value="0005" /> <variable name="tree_id" condition_value="HV" value="0006" /> </condition> <Values name="2level"> <condition name="voltage_level"> <condition_value value="LV" /> <condition_value value="MV" /> <condition_value value="CTRL" /> <condition_value value="IW" /> <condition_value value="COM" /> <condition_value value="HV" /> </condition> <Value xl_col="A" tree="1" h_level="1" tag="Name" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="A" tree="1" h_level="1" tag="CablePref" mandatory="0" format_xtr="NOP" format_pub="($0,Name)" /> <Value xl_col="A" tree="1" h_level="2" tag="Name" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="A" tree="1" h_level="2" tag="CablePref" mandatory="0" format_xtr="NOP" format_pub="($0,Name)" /> <Value xl_col="E" tree="2" h_level="3" tag="Name" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="F" tree="2" h_level="3" tag="RoutingFilter" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="G" tree="2" h_level="3" tag="CableType" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="A" tree="2" h_level="3" tag="PreDefSourceID" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="B" tree="2" h_level="3" tag="ObjectFromLoc" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="C" tree="2" h_level="3" tag="PreDefTargetID" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="D" tree="2" h_level="3" tag="ObjectToLoc" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="H" tree="2" h_level="3" tag="CableLookup" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="I" tree="2" h_level="3" tag="Load" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="J" tree="2" h_level="3" tag="CableAddLength1" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="K" tree="2" h_level="3" tag="CableAddLength2" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="L" tree="2" h_level="3" tag="SpareCore" mandatory="1" format_xtr="X" format_pub="($X)" /> <!-- <Value xl_col="F" tree="2" h_level="3" tag="CableDescr" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="H" tree="2" h_level="3" tag="CableLookup" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="I" tree="2" h_level="3" tag="Load" mandatory="1" format_xtr="X" format_pub="($X)"/> --> </Values> </XLImportSheet>
2.设备匹配导入文件及其配置文件:
map.xls
<?xml version="1.0" encoding="utf-8"?> <XLImportSheet> <Sheets> <Sheet number="1" name="" line_start="3" line_stop="100" col_start="A" col_end="Z" /> </Sheets> <Values name="2level"> <Value xl_col="B" tree="1" h_level="1" tag="ID" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="A" tree="1" h_level="1" tag="NODE" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="C" tree="1" h_level="1" tag="DIST" mandatory="0" format_xtr="X" format_pub="($X)" /> </Values> </XLImportSheet>
3.设备导入(坐标)文件及其配置文件:
设备导入.xlsx Fullscreen 设备导入.xml Download <?xml version="1.0" encoding="utf-8"?> <XLImportSheet> <Sheets> <Sheet number="1" name="" line_start="2" line_stop="500" col_start="A" col_end="Z" /> </Sheets> <Values name="2level"> <Value xl_col="H" tree="1" h_level="1" tag="ID" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="C" tree="1" h_level="1" tag="X" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="D" tree="1" h_level="1" tag="Y" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="E" tree="1" h_level="1" tag="Z" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="B" tree="1" h_level="1" tag="EQUIPMENTNAME" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="A" tree="1" h_level="1" tag="NODEID" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="F" tree="1" h_level="1" tag="UDANAME" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="G" tree="1" h_level="1" tag="UDAVALUE" mandatory="0" format_xtr="X" format_pub="($X)" /> </Values> </XLImportSheet>
<?xml version="1.0" encoding="utf-8"?> <XLImportSheet> <Sheets> <Sheet number="1" name="" line_start="2" line_stop="500" col_start="A" col_end="Z" /> </Sheets> <Values name="2level"> <Value xl_col="H" tree="1" h_level="1" tag="ID" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="C" tree="1" h_level="1" tag="X" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="D" tree="1" h_level="1" tag="Y" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="E" tree="1" h_level="1" tag="Z" mandatory="1" format_xtr="X" format_pub="($X)" /> <Value xl_col="B" tree="1" h_level="1" tag="EQUIPMENTNAME" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="A" tree="1" h_level="1" tag="NODEID" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="F" tree="1" h_level="1" tag="UDANAME" mandatory="0" format_xtr="X" format_pub="($X)" /> <Value xl_col="G" tree="1" h_level="1" tag="UDAVALUE" mandatory="0" format_xtr="X" format_pub="($X)" /> </Values> </XLImportSheet>
4.电缆型号导入文件及其配置文件:
CableType.xls Fullscreen IMPORT_CableType.xml Download <?xml version="1.0"?> <!-- substr(<variable for result>, <absolute/relative start position>) substr(<variable for result>, <absolute/relative start position>, absolute/relative end position/additional substring length) absolute position: 0, 5,... relative position: 1x'.'+1 = first occurance of '.' plus one char 2x' - '+3 = second occurance of ' - ' plus three chars r1x'-'-1 = first '-' backwards (last '-') minus one char additional substring length: +0 = no additional length = just the char at the start position +3 = start position plus three chars = length 4 sbustr with only two parameters retrieves substring from start position until and including last character format_xtr (extraction format): sbustring or absolute value format_pub (publish format) : [prefix]($<result variable of format_xtr>)[suffix] mandatory: <1||yes||true||on> || <0||no||false||off> --> <XLImportSheet version="0.1" created_by="oh" company="Bentley"> <Sheets> <Sheet number="1" name="" line_start="2" line_stop="10" col_start="A" col_end="Z"/> </Sheets> <Values name="CableType"> <Value xl_col="A" tree="1" h_level="1" tag="NAME" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="D" tree="1" h_level="1" tag="UNITS" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="E" tree="1" h_level="1" tag="DIAMETER" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="F" tree="1" h_level="1" tag="WEIGHT" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="G" tree="1" h_level="1" tag="MATCHCODE" mandatory="0" format_xtr="X" format_pub="($X)"/> <Value xl_col="H" tree="1" h_level="1" tag="FIRELOAD" mandatory="0" format_xtr="X" format_pub="($X)"/> <Value xl_col="I" tree="1" h_level="1" tag="PRIORITY" mandatory="0" format_xtr="X" format_pub="($X)"/> </Values> </XLImportSheet>
<?xml version="1.0"?> <!-- substr(<variable for result>, <absolute/relative start position>) substr(<variable for result>, <absolute/relative start position>, absolute/relative end position/additional substring length) absolute position: 0, 5,... relative position: 1x'.'+1 = first occurance of '.' plus one char 2x' - '+3 = second occurance of ' - ' plus three chars r1x'-'-1 = first '-' backwards (last '-') minus one char additional substring length: +0 = no additional length = just the char at the start position +3 = start position plus three chars = length 4 sbustr with only two parameters retrieves substring from start position until and including last character format_xtr (extraction format): sbustring or absolute value format_pub (publish format) : [prefix]($<result variable of format_xtr>)[suffix] mandatory: <1||yes||true||on> || <0||no||false||off> --> <XLImportSheet version="0.1" created_by="oh" company="Bentley"> <Sheets> <Sheet number="1" name="" line_start="2" line_stop="10" col_start="A" col_end="Z"/> </Sheets> <Values name="CableType"> <Value xl_col="A" tree="1" h_level="1" tag="NAME" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="D" tree="1" h_level="1" tag="UNITS" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="E" tree="1" h_level="1" tag="DIAMETER" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="F" tree="1" h_level="1" tag="WEIGHT" mandatory="1" format_xtr="X" format_pub="($X)"/> <Value xl_col="G" tree="1" h_level="1" tag="MATCHCODE" mandatory="0" format_xtr="X" format_pub="($X)"/> <Value xl_col="H" tree="1" h_level="1" tag="FIRELOAD" mandatory="0" format_xtr="X" format_pub="($X)"/> <Value xl_col="I" tree="1" h_level="1" tag="PRIORITY" mandatory="0" format_xtr="X" format_pub="($X)"/> </Values> </XLImportSheet>