GithubHelp home page GithubHelp logo

Comments (26)

andershansson avatar andershansson commented on August 21, 2024

Worth mentioning is that LibreOffice handles the files just fine.

from elixlsx.

Fabi755 avatar Fabi755 commented on August 21, 2024

Hey, thanks for your report.

I can not reproduce this.. generating with the example and open with same version works fine.
Please add your code that generate your excel file to evaluate this.

from elixlsx.

andershansson avatar andershansson commented on August 21, 2024

Unfortunately the code is part of a proprietary code base and I cannot freely share it. I'll try to replicate with a minimized version to replicate it!

One thing I did notice was that I set the bg_color to #000000 (black) and fg_color to #FFFFFF (white) for some of the cells but they end up being colored with a black dots on a white background instead of white text on black. It could be related to this (maybe). Other bg_colors and fg_colors seems to be working in other cells. (All is showing up fine and looking good in LibreOffice).

I'll get back with an example to replicate it as soon as possible!

from elixlsx.

Fabi755 avatar Fabi755 commented on August 21, 2024

I'll try to replicate with a minimized version to replicate it!

That will help to find the problem, thanks.

One thing I did notice was that I set the bg_color to #000000 (black) and fg_color to #FFFFFF (white) for some of the cells but they end up being colored with a black dots on a white background instead of white text on black.

This bug has already fixed in #20 but is not published on hex.pm yet. This will only cause that the first used background color ended up in black dots.

from elixlsx.

andershansson avatar andershansson commented on August 21, 2024

One thing I did notice was that I set the bg_color to #000000 (black) and fg_color to #FFFFFF (white) for some of the cells but they end up being colored with a black dots on a white background instead of white text on black.

This bug has already fixed in #20 but is not published on hex.pm yet. This will only cause that the first used background color ended up in black dots.

Ah, thank you. I'll try to get the version directly from git instead!

from elixlsx.

andershansson avatar andershansson commented on August 21, 2024

Ah, thank you. I'll try to get the version directly from git instead!

Unfortunately this breaks things with the bg colors in general and shuffles around the colors and some of them becomes white instead (loses the styling).

I'll provide code to replicate.

from elixlsx.

andershansson avatar andershansson commented on August 21, 2024

I found the problem why the cell background colors was breaking and I've created a PR with a fix.

Getting back to the original issue here with broken files needing repairs, I've verified that it is being replicated by using the example file in the repository.

I'm attaching the generated example.xslx file to this comment.

Most likely this may have something to do with the version of Elixir/OTP I'm running maybe?

Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.4.2

empty.xlsx

from elixlsx.

xou avatar xou commented on August 21, 2024

I unfortunately don't have a mac, so I can't directly debug this. Does this happen with all files generated by the current elixlsx HEAD version? (even empty ones?) If not, can you try to provide a minimal example that causes that warning message?

re @Fabi755's comment about the version not being on hex.pm yet, sorry about that, as soon as we figure out what's happening here i'll update the hex.pm version.

from elixlsx.

andershansson avatar andershansson commented on August 21, 2024

Yes, even empty ones are showing the same problem. If you generate a file from the example file in the repository and attach it here I can try to see if I can determine the difference and maybe that will give us some clue what is happening.

from elixlsx.

mspanc avatar mspanc commented on August 21, 2024

I have the same issue using 0.1.1.

Here is the file generated by the library

RadioJAZZ.FM - STOART - 4-2017(1).xlsx

that is causing this error:

screen shot 2017-04-20 at 23 09 36

I also see gray background as dotted.

from elixlsx.

andershansson avatar andershansson commented on August 21, 2024

@mspanc I had the same issue and I've submitted a PR with a fix for the dotted background issue some week ago. I believe it has been accepted and merged in HEAD if you switch to that instead of the hex package it should work.

from elixlsx.

xou avatar xou commented on August 21, 2024

Yep, i'll push the fix for the grey background out as soon as we've figured out what's happening with the import error.

Unfortunately, I don't have access to MS office, neither on windows nor on mac.
Does this problem occur with older elixlsx versions as well? Would you mind attaching an empty xlsx file generated by Office for Mac?

from elixlsx.

mspanc avatar mspanc commented on August 21, 2024

Here it is

Workbook1.xlsx

excel for mac 2011
version 14.7.3 (170325)

from elixlsx.

mspanc avatar mspanc commented on August 21, 2024

Here's the file I generate:

Reggae Dub - STOART - 4-2017.xlsx

and here's the same file saved by excel for mac after clicking "Open and repair" button:

Reggae Dub - STOART - 4-2017 - repaired.xlsx

from elixlsx.

xou avatar xou commented on August 21, 2024

Looking that the diffs between the files I couldn't really figure out what was going on.
I've created a few files manually using components from an elixir empty file and the one you provided. Can you open them and check if there is one of them that does not show the "needs to be repaired" warning? Cheers
custom-xl-workbook.xlsx
custom-xl-theme-theme1.xlsx
custom-xl-theme-style-contenttype-merged.xlsx
custom-xl-styles.xlsx
custom-xl-sheet.xlsx
custom-xl-contenttypes.xlsx
custom-docprops-core.xlsx
custom-docprops-app.xlsx

from elixlsx.

mspanc avatar mspanc commented on August 21, 2024

Only custom-docprops-app.xlsx does not show warning.

from elixlsx.

xou avatar xou commented on August 21, 2024

Ok, weird. I can't see anything obviously wrong with that file (according to http://www.datypic.com/sc/ooxml/t-extended-properties_CT_Properties.html all fields are optional), i'll set up another set of files later this week.

Thanks for testing! :)

from elixlsx.

xou avatar xou commented on August 21, 2024

Hi, can you try again with the attached files?

Thanks!

app-titlesofparts.xlsx
app-headingpairs.xlsx
app-flags.xlsx
app-docsecurity.xlsx
app-appversion.xlsx
app-application.xlsx

from elixlsx.

mspanc avatar mspanc commented on August 21, 2024

Only app-appversion.xlsx does not show a warning.

from elixlsx.

mspanc avatar mspanc commented on August 21, 2024

I made a mistake in the previous comment and if you read this thread via mail notifications you might see the old version. So I repeat: Only app-appversion.xlsx does not show a warning.

from elixlsx.

xou avatar xou commented on August 21, 2024

Ok, another one ;)
empty2.xlsx

from elixlsx.

mspanc avatar mspanc commented on August 21, 2024

Works fine

from elixlsx.

andershansson avatar andershansson commented on August 21, 2024

I can also confirm that the last one works in Excel on my Mac without warnings.

from elixlsx.

xou avatar xou commented on August 21, 2024

Can you checkout the current HEAD and see if the problem is resolved?

from elixlsx.

andershansson avatar andershansson commented on August 21, 2024

I've verified that it now works with my generated files on Mac!

From my perspective this issue has been resolved! Great work! Thank you!

from elixlsx.

xou avatar xou commented on August 21, 2024

Sweet. Closing this, thanks everyone for the help in figuring this out :)

from elixlsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.