- Notifications
You must be signed in to change notification settings - Fork1.9k
Improvements for images (correct reading/writing possitions)#702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…g from xlsx with fully back compatible.NEW Anchor modelNEW Integration tests test for image`s reader & writerNEW Unit tests for Anchor
Siemienik commentedJan 10, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I hope that, in the future both repositories become to be merged ;) |
alubbe left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't really know enough about images in excel, but I like the tests, so I think this can be merged. Should we maybe do a rebase?
lib/doc/worksheet.js Outdated
| this.autoFilter=value.autoFilter; | ||
| this._media=value.media; | ||
| varself=this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this line is not needed
| @@ -0,0 +1,56 @@ | |||
| /** | |||
| * Copyright (c) 2018 Paweł Siemienik | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Personally, I think this shouldn't be in individual files
SiemienikJan 15, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@alubbe In each file is copyright/author block similar to this, if it's wrong could you write how it should looks like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ah indeed - I had completely missed that. Let's leave that in then.
@guyonroche I've only seen licenses repeated in every file if you want to charge license fees for your IP, but since we use MIT I think there's no need to have this repeated everywhere - it's just noise that needs maintenance. Would you be okay with removing them everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@alubbe Yeah - We could probably get away with just the LICENCE file with links from the README.md and main excel.js file.
I finally have more spare time now so I can start working through the PRs. I'll test this one tomorrow morning
Siemienik commentedJan 15, 2019
Thank You@alubbe for review, I will make required fixes as soon as possible ;) |
alubbe commentedJan 21, 2019
Happy now with this PR code-wise, but I can't speak to the functionality. Can anyone test it with an actual excel file? |
Siemienik commentedJan 21, 2019
I had to made this fixes for my businesses project when I read and modify xlsx files. With this PL it works fine. below is link to xlsx file, what i prepared for test purposes. If you have possible, just download, open&write it (exceljs |
moddaman commentedJan 28, 2019
nice@Siemienik Looking to forward to this being merged. Until then i have updated my package.json to use `"exceljs": "github:p3rio/exceljs#build"``. How do i use this functionality? Do I use it the same way? Could you update the readme? |
kaidoj commentedFeb 13, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This did not work for me. I tested my excel in 3 different Excel readers and it only worked in one. Images where placed wrong. For now i went back to my fork. That atleast works with my offsets set. tl:{col:imageColumnPosition+0.05,row:i+0.05,},br:{col:imageColumnPosition+0.95,row:i+0.95//this aint working either. I have to use 1 but that is bad. Image overlapping row line.} |
Siemienik commentedFeb 18, 2019
@kaidoj could You share excel files which were failed? |
Siemienik commentedFeb 18, 2019
@moddaman it enough to use images like before. This PR fixes counting possitions for images in reader and writer. Before that, reader and writer ignore current column width and always use the same value, so when column width was larger than 'this const' it put image to another column. |
alubbe commentedMar 12, 2019
@kaidoj could you please share a file where it doesn't work? |
dogusev commentedMar 29, 2019
@alubbe |
alubbe commentedMar 31, 2019
@guyonroche awesome, will be great to have you back! :) |
mjiskinng commentedJul 24, 2021
Hi Guyz how to solve this issue. Any idea if i add dependencies "exceljs": "github:p3rio/exceljs#build" it still throws error i believe its clashing with the latest exceljs. Any idea how can i work with both in parallel using image functionality of p3rio and rest from master. Please help me this issue is now taking more than 1 month.. |
Siemienik commentedJul 26, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@mjiskinng Since 1 Apr 2019 this PR is included in the ExcelJS main package. Could you use : |
Uh oh!
There was an error while loading.Please reload this page.
Improvements for image`s positioning/stretching and their properly writing to xlsx and readign from xlsx with fully backward compatibility.
Before that changes,
Reading images positions workswrong. This example show it very well,


original file looks that:
after i open this file and savewithout any changes:
Backward compability
My solution was designed to handle current
col/rowand calculate it tonativeCol,nativeColOff,nativeRow,nativeRowOff. A lot of tests was written to ensure properly working with dependents apps .I will be glad for quick checking/approval this pull request, I am open for your comments and ready to make some fixes.
issues
#650
#467