Skip to content

Problem inserting into Excel Tables - results in a corrupted file, aft. repair the output is not what we expect... #857

Open

Description

@hidegh

Excel Type

  • XLSX
  • XLSM
  • CSV
  • OTHER

Upload Excel File

meTemplate.xlsx

MiniExcel Version

1.41.3

Description

I have set up a table in excel - reason:

  • easier to do subtotals
  • formatting

The output aft. repairing hte corrupted file looks like this:

Image

Whereas the setup was:

Image

Activity

  1. michelebastione commented on Aug 23, 2025

    @michelebastione
    Collaborator

    This is actually related to the DateTime problem you mentioned in #856. Fundamentally, the problem can be reduced to mapping the generated data to the correct style, formatting, etc... which is something that wasn't really thought of when the templating system was originally implemented.
    You could partially work around this by moving the children table just below the balance in your template, this would fix the headers but still won't extend the table to include your data. I'm sorry to let you down but it will probably take an extensive amount of time to address the issue appropriately and make the necessary changes to fix it.

  2. hidegh commented on Aug 28, 2025

    @hidegh
    Author

    Not sure that it relates to the DateTime - it is just rendered as a string, not as an int, so Excel is fine with that. So that's a different issue, but fairly easy to fix, especially if we leave it to EXCEL to handle how the date (integer) gets formatted and displayed.

    This problem showed up just when I started to use TABLES inside Excel, and the problem is twofold:

    • corrupted file
    • header generation

    There should be no header generation by default, especially not within tables, but even so, I doubt the corrupted file is due to that extra header...rather some other OpenXML structure thing.

  3. michelebastione commented on Aug 28, 2025

    @michelebastione
    Collaborator

    I apologize for not explaining myself comprehensively. There is in fact, no header generation. The header is the same one from the table in your template, but it is pushed downwards by the other generated data and the file gets corrupted because the table can't find the referenced data anymore. That's why I suggested moving the whole table above the other generated content, as a workaraound, like I mentioned this will b very tricky to fix. I hope I managed to illustrate the issue in a clearer way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions