Xls corrupted and failed to load jsreport.config.json on asp net core

  • Hi guys! I'm developìng an asp net core app on Linux and VS Code and deploying the same app in a windows server 2012 with iis.
    I have two problems:

    • The first one, I print 2 reports, when i print in a dev environment (linux/vs code) i can print both, but when i deploy the app in the windows server, the pdf report is ok but de xls report is corrupted.
    • The second one, i want to use the logger configuration (using jsreport.config.json) to find in the prod environment the logs for the error in xls report but i can load any file configuration. I tried in several path within the project folder.
      I can't apply any jsreport configuration by file.

    Here is the code:

              services.AddJsReport(new LocalReporting()
                                                .RunInDirectory(Path.Combine(Directory.GetCurrentDirectory(), "jsreport"))                                            
                                                .UseBinary(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
                                                            jsreport.Binary.JsReportBinary.GetBinary() :
                                                .Configure( cfg => { 
                                                                cfg.Express = new ExpressConfiguration() { InputRequestLimit = "200mb" }; 
                                                                cfg.Logger = new LoggerConfiguration(){ Transport = new LoggerTransportConfiguration(){ Filename = "/home/javier/logs/jslog.txt", Level = "debug", Transport = "file"} };
                                                                return cfg;
        "logger": {
            "console": {
                "transport": "console",
                "level": "debug"
            "file": {
                "transport": "file",
                "level": "info",
                "filename": "/home/javier/logs/log.txt"
            "error": {
                "transport": "file",
                "level": "error",
                "filename": "/home/javier/logs/error.txt"

    and the project structure:

  • Hi,

    I'm also not able to apply logging through config file. It looks like a bug, you can track it here

    As workaround please start jsreport local as web server using AsWebServer. This way the logging config gets applied and you can get more information from logs.

    Can you try to run a simple one cell excel report and share both working and corrupted excel here?

  • Thank you for your reply.
    There are differences between 2 excels (linux working and windows server not)

    And the links

  • Sorry for the delay.
    Hm. Both files works for me in ms excel on windows. How have you found out it is corrupted?

    I see inside there are some differences in the size/color of the cell.
    I believe you use the html-to-xlsx recipe?
    The phantomjs engine which is used to evaluate html is producing different sizes when running on different OS.
    There is workaround mentioned in the docs https://jsreport.net/learn/phantom-pdf#different-sizes-on-windows-vs-unix
    Another option is to try out the v2 pre-release nugets which are using chrome instead of phantomjs.
    The chrome doesn't have this issue.

  • The problem is when i use Libreoffice and google spreadsheet.
    I have opened in dropbox and it displays correctly.

  • After deep investigation I found that
    this works in libre office <row r="1" spans="1:1" ht="15.00" but this doesn't <row r="1" spans="1:1" ht="15"

    Based on the spec it is bug in libre office. But I will try to fix it with "15.00" which works also in ms excel.

    Until the fix is propagated, you could try to increase a height so the row is not exactly 15.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.