how to publish to excel in arbortext editor 6.0?
In arbortext editor 6.0,how to publish document to excel file ?
In arbortext editor 6.0,how to publish document to excel file ?
You can use a FOSI stylesheet to generate a comma-separated file from a structured markup document.
First, set the file extension for FOSI-exported files to ".csv" with the APTEXPORTEXT system variable.
Second, code e-i-cs that save the desired content, commas, and record ends to an appended string and write the result to an external ASCII file.
For example, assuming the content is in table cells, the following e-i-cs will generate a comma-separated file in the document directory when the document is formatted:
<e-i-c gi="entry" context="* table" occur="notlast">
<charlist inherit="1">
<savetext textid="csv.app" conrule="#CONTENT,\,\" append="1">
</charlist>
</e-i-c>
<e-i-c gi="entry" context="* table" occur="last">
<charlist inherit="1">
<savetext textid="csv.app" conrule="#CONTENT,\&#RE;\" append="1">
</charlist>
</e-i-c>
<e-i-c gi="generated">
<charlist inherit="1">
<usetext source="csv.app" userule="1"></usetext>
</charlist>
</e-i-c>
<e-i-c gi="table">
<charlist inherit="1">
<usetext source="<generated>,</generated>" placemnt="after"></usetext>
</charlist>
</e-i-c>
The resulting file will be named generated.csv. To change the file name, change the three instances of "generated" to the desired name.
I've attached a bare-bones FOSI with the above e-i-cs, which can be used as a template. If the desired content is not in table cells, then element names, contexts, and occurrences can be modified as needed.
For example, if the desired content is in markup such as this:
<partlist><part><partno>...</partno><partdesc>...</partdesc></part>...</partlist>
the following changes would be needed:
gi="entry" context="* table" occur="notlast" becomes gi="partno" context="part partlist" occur="all"
gi="entry" context="* table" occur="last" becomes gi="partdesc" context="part partlist" occur="all"
gi="table" becomes gi="partlist"
To generate the .csv file, put the cvs.fos file in the same directory as the document, then enter the following at the command line:
set fosi=csv; format
BTW: More than one e-i-c can write an external file.
Hope this heps! Please let me know any questions you may have.
Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.