Subject: Re: [EXTERNAL] Re: [xsl] Extracting a XLSX directly using XSLT 3 and Saxon HE From: "Lizzi, Vincent vincent.lizzi@xxxxxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 19 Jul 2022 16:23:55 -0000 |
These might be helpful if even just as examples of using XSLT and XQuery to read or create xlsx files: https://github.com/eliudmeza/OOXML-Library-XQuery-BaseXdb https://github.com/vincentml/xsl-excel-engine > doc('jar:file:/C:/SomePath/SomeDir/excel-sheet1.xlsx!/xl/workbook.xml') That is a useful trick! It appears to be specific to Saxon. Thanks, Vincent _____________________________________________ Vincent M. Lizzi Head of Information Standards | Taylor & Francis Group vincent.lizzi@xxxxxxxxxxxxxxxxxxxx<mailto:vincent.lizzi@xxxxxxxxxxxxxxxxxxxx> From: Gayanthika Udeshani gudeshani@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, July 19, 2022 12:04 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [EXTERNAL] Re: [xsl] Extracting a XLSX directly using XSLT 3 and Saxon HE to get the URIs of (some or all?) contained files, it appears, and then you can read the XML files with the doc function e.g. doc('jar:file:/C:/SomePath/SomeDir/excel-sheet1.xlsx!/xl/workbook.xml') This works like magic without any additional configuration changes with the Saxon PE version 10. You can access the inner xml files of an Excel file without extracting it! Thanks again for your help! On Thu, Jul 7, 2022 at 1:39 AM Martin Honnen martin.honnen@xxxxxx<mailto:martin.honnen@xxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list-service@xxxxxxxxxxxx rytech.com>> wrote: On 06.07.2022 18:39, Gayanthika Udeshani gudeshani@xxxxxxxxxx<mailto:gudeshani@xxxxxxxxxx> wrote: > > > I did some research and I couldn't find whether there is any XSLT 3 > feature in the Saxon HE, which allows extracting the xlsx (Excel file) > directly. I found some solutions using Saxon EE, want to know whether > I have missed something which we can apply using the HE. > On closer look, it seems even Saxon HE can treat an xlsx file as a zip archive if you pass in the right configuration property (example worked for me with Windows Powershell on the command line for Saxon HE 11 and 10) --zipUriPattern:'.*\.xlsx' From there you can use e.g. uri-collection('excel-sheet1.xlsx') to get the URIs of (some or all?) contained files, it appears, and then you can read the XML files with the doc function e.g. doc('jar:file:/C:/SomePath/SomeDir/excel-sheet1.xlsx!/xl/workbook.xml') But as Mike said, the whole structure is rather complicated, with all the references across various files you either need to know your way around Spreadsheet ML or perhaps already have a stylesheet by someone that learned to process such a structure to extract/transform the spreadsheet data. XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list> EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/194671> (by email<>) Information Classification: General
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [EXTERNAL] Re: [xsl] Extracting, Gayanthika Udeshani | Thread | [xsl] Is it possible to use replace, Torsten Schaßan scha |
Re: [EXTERNAL] Re: [xsl] Extracting, Gayanthika Udeshani | Date | [xsl] XPath expression that returns, Roger L Costello cos |
Month |