Opened issue: https://github.com/jsreport/jsreport/issues/312
drmikecrowe
@drmikecrowe
Posts made by drmikecrowe
-
XLSX download via Docker jsreport/jsreport:1.7.0-full results in corrupt file
It started with my previous post, and since this appears to a different issue, opening up a new thread.
Using this playground example, the file downloaded is corrupt if you are running jsreport via a Docker container.
If I install/run jsreport locally using the same configuration, same application API calls (or using the studio), download works fine w/o an issue (npm install, jsreport init, jsreport start).
LibreOffice Errors
Setup
Starting the docker image using composer file:
jsreport: hostname: jsreport image: jsreport/jsreport:1.7.0-full restart: always ports: - "2945:2945" volumes: - ./new-containers/jsreport-home:/jsreport dns: - 8.8.8.8
Configuration:
{ "certificate": { "key": "certificates/jsreport.net.key", "cert": "certificates/jsreport.net.cert" }, "connectionString": { "name": "fs" }, "httpsPort": 2945, "logger": { "console": { "transport": "console", "level": "debug" } }, "express.inputRequestLimit": "50mb", "blobStorage": "fileSystem", "phantom": { "strategy": "dedicated-process", "timeout": 60000 }, "tasks": { "strategy": "dedicated-process", "timeout": 10000, "allowedModules": [] }, "scripts": { "allowedModules": [], "timeout": 60000 } }
-
RE: Converting 0.13.2 xlsx template to 1.x
Ah, the issue is the file creation is using a \ instead of a slash:
./xl\_rels/workbook.xml.rels ./xl\theme/theme1.xml ./xl\worksheets/sheet1.xml
If I move these directories
xl\_rels
toxl/_rels
(or more specifically_rels
underxl/
) then it works fine. -
RE: Converting 0.13.2 xlsx template to 1.x
Probably -- I'll have to investigate how to handle that during the upgrade. Thanks Jan!
-
RE: Converting 0.13.2 xlsx template to 1.x
Weird, the unzip now works on these (I wonder if the size of the data, which I trimmed down has an effect)
Did you try and open in LibreOffice? Here's what I'm seeing:
-
RE: Converting 0.13.2 xlsx template to 1.x
Hmm, strange -- I'm using ubuntu native (opera browser). Let me try a different browser...
-
RE: Converting 0.13.2 xlsx template to 1.x
https://playground.jsreport.net/studio/workspace/Hy7m2WABZ/5
NOTE: Pressing Run works fine. Must Download to see the issue
-
Converting 0.13.2 xlsx template to 1.x
Hi folks,
The template below no longer works in 1.x due to the xlsx enhancements. Since it's in EJS, could somebody give me the high-level instructions on how to update or what might be incompatible with 1.x?
If I try and "unzip text.xlsx" from bash, I get:
Archive: test.xlsxcaution: zipfile comment truncated error [test.xlsx]: missing 3282865094 bytes in zipfile (attempting to process anyway) error [test.xlsx]: attempt to seek before beginning of zipfile (please check that you have transferred or created the zipfile in the appropriate BINARY mode and that you have compiled UnZip properly)
The template that worked on 0.13.2 is:
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"> <dimension ref="A1"/> <sheetViews> <sheetView workbookViewId="0"/> </sheetViews> <sheetFormatPr defaultRowHeight="13.5"/> <cols> <% if(template_options) { _.forEach(_.get(template_options, 'fields', []), function(field, index) { %><col min="<%= index+1 %>" max="<%= index+1 %>" width="<%= field.width || 18 %>" /> <% })}; %> </cols> <sheetData> <row> <% if(template_options) { _.forEach(_.get(template_options, 'fields', []), function(field, index) { %><c t="inlineStr"><is><t><%- field.label %></t></is></c> <% })}; %> </row> {{for table.data}} <row> <% if(template_options) { _.forEach(_.get(template_options, 'fields', []), function(field, index) { %> <% if ( field.type == "integer" || field.type == "number" || field.type == "float") { %> <c t="n"><v>{{><%- field.value %>}}</v></c> <% } else { %> <c t="inlineStr"><is><t>{{><%- field.value %>}}</t></is></c> <% } %> <% })}; %> </row> {{/for}} </sheetData> <phoneticPr fontId="1" type="noConversion"/> <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/> <pageSetup paperSize="9" orientation="portrait" horizontalDpi="200" verticalDpi="200"/> </worksheet>