source: 1dwg/trunk/examples/collagen/excel-macros.txt @ 7

Last change on this file since 7 was 7, checked in by prjemian, 13 years ago

use trunk,tags,branches

File size: 710 bytes
Line 
1
2Function XML_tag(tag, attr, content) As String
3  If attr = "" Then
4    XML = "<" & tag & ">"
5  Else
6    XML = "<" & tag & " " & attr & ">"
7  End If
8  XML = XML & content
9  XML = XML & "</" & tag & ">"
10  XML_tag = XML
11End Function
12
13Function SAS_Idata_tag(element, unit, content) As String
14  XML = XML_tag(element, "unit=""" & unit & """", content)
15  SAS_Idata_tag = XML
16End Function
17
18Function Idata_tag(Q, Q_unit, I, I_unit, Qdev, Qdev_unit, Idev, Idev_unit) As String
19  XML = SAS_Idata_tag("Q", Q_unit, Q)
20  XML = XML & SAS_Idata_tag("I", I_unit, I)
21  XML = XML & SAS_Idata_tag("Qdev", Qdev_unit, Qdev)
22  XML = XML & SAS_Idata_tag("Idev", Idev_unit, Idev)
23  Idata_tag = XML_tag("Idata", "", XML)
24End Function
Note: See TracBrowser for help on using the repository browser.