You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not randomly delete sections. They are here for a reason.
Do you want to request a feature or report a bug?
Bug
Feature
Question
Did you test against the latest CI build?
Yes
No
I want to center an image inside a cell. I see that excel can also do it if I do it manually by pressing insert -> pictures -> place in cell, and then adding photo and centering + resizing cell.
However, I want to do it with closedXml. I don't know if this exists and I'm missing something (I did look at documentation), hence, not opening a feature request. The only things I've found were to move it to a cell and then resizing a bit oddly using point size rather than pixel size which the image s, but point size is typically, but not necessarily 7 pixels so this can be problematic and result in bugs. It also results in very odd, and ugly code that doesn't function as I want as I don't want the image above the cells, rather inside.
This is a question, not a bug/feature request so the following sections are not exactly relevant.
Regressions get higher priority. Test against the latest build of the previous minor version. For example, if you experience a problem on v0.95.3, check whether it the problem occurred in v0.94.2 too.
Reproducibility
This is an important section. Read it carefully. Failure to do so will cause a 'RTFM' comment.
Without a code sample, it is unlikely that your issue will get attention. Don't be lazy. Do the effort and assist the developers to reproduce your problem. Code samples should be minimal complete and verifiable. Sample spreadsheets should be attached whenever applicable. Remove sensitive information.
Code to reproduce problem:
publicvoidMain(){// Code standards:// - Fully runnable. I should be able to copy and paste this code into a // console application and run it without having to edit it much.// - Declare all your variables (this follows from the previous point)// - The code should be a minimal code sample to illustrate issue. The code // samples on the wiki are good examples of the terseness that I want. Don't// post your full application.}
I attached a sample spreadsheet. (You can drag files on to this issue)
The text was updated successfully, but these errors were encountered:
You need to set the Placement attribute picture.Placement = XLPicturePlacement.MoveAndSize;
However, be careful that if you use multiple images with this attribute Excel will give an error and therefore when you use the MoveTo function you must do this: picture.MoveTo(currentCell, currentCell.CellBelow().CellRight());
Read and complete the full issue template
Do not randomly delete sections. They are here for a reason.
Do you want to request a feature or report a bug?
Did you test against the latest CI build?
I want to center an image inside a cell. I see that excel can also do it if I do it manually by pressing insert -> pictures -> place in cell, and then adding photo and centering + resizing cell.
However, I want to do it with closedXml. I don't know if this exists and I'm missing something (I did look at documentation), hence, not opening a feature request. The only things I've found were to move it to a cell and then resizing a bit oddly using point size rather than pixel size which the image s, but point size is typically, but not necessarily 7 pixels so this can be problematic and result in bugs. It also results in very odd, and ugly code that doesn't function as I want as I don't want the image above the cells, rather inside.
This is a question, not a bug/feature request so the following sections are not exactly relevant.
If you answered
No
, please test with the latest development build first.Version of ClosedXML
e.g. 0.95.3
What is the current behavior?
Complete this.
What is the expected behavior or new feature?
Complete this.
Is this a regression from the previous version?
Regressions get higher priority. Test against the latest build of the previous minor version. For example, if you experience a problem on v0.95.3, check whether it the problem occurred in v0.94.2 too.
Reproducibility
This is an important section. Read it carefully. Failure to do so will cause a 'RTFM' comment.
Without a code sample, it is unlikely that your issue will get attention. Don't be lazy. Do the effort and assist the developers to reproduce your problem. Code samples should be minimal complete and verifiable. Sample spreadsheets should be attached whenever applicable. Remove sensitive information.
Code to reproduce problem:
The text was updated successfully, but these errors were encountered: