Re: Creating Excel files in eXist-db?

Kevin Brown via Exist-open <[email protected]>
Newsgroups gmane.text.xml.exist
Organization Xportability LLC
Message-ID <[email protected]>
For a customer, I created a highly specialized set of queries and XSLs.

They have their own XML structure.

They can create a document in their system which creates a very small
template document.

If they choose to, they can export that to a Word template.

We striped down a .docx, adjusted a few things and checked that into a
structure in eXist.
When you export, we copy that structure, take their XML and make the
document.xml file, inject it, zip it and send it back.

They can then edit in Word. The template Word document has some default
styles that are used to map into specific structures in their XML. Their
specialized XML also includes structures like:

<div type="if" test="state='UT'">blah blah</div> 

Which are also handles in style mapping and tags in Word. 

On check in, everything is reversed essentially uploading the .docx,
stripping out the document.xml, using XSL to make their XML and checking
that in.

The solution even grabs images in SVG and puts them into the Word document,
handles multiple user types by mapping certain areas as not editable, etc.

This whole scenario runs side-by-side with HTML-based editing of their XML
mapped into XHTML and fed to Summernote HTML editor, providing them an
ability to edit in Word or in a web browser.

As it is custom to them, it is not easy to share things. 
A few gotchas - you cannot just use the template as is, you may need to hand
edit some namespaces to get in all right in the extracted .docx.

If you plan to go both ways, you have to control the authors or make sure at
the very least they are not doing dumb things (like instead of picking
"Heading Level 2" they just override font-size and style).
Some of the files in a .docx file must be uploaded as binary even though
they may not look like one. I believe this applies to .res files in the
.docx zip container.

Kevin Brown
Xportability

 

From: Len Schultz <[email protected]> 
Sent: Wednesday, August 10, 2022 12:15 AM
To: Craig Berry via Exist-open <[email protected]>
Subject: [Exist-open] Creating Excel files in eXist-db?

 

Has anyone created XLSX files in eXist-db?  If so, please share some
pointers.

 

--len

_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.