I'm looking to rotate a 3D model (.STL) that I loaded into excel using vba code. The end goal is to have a button that rotates in X axis by a specific amount of degrees, another in Y axis and another one in Z axis.
So far I've tried
Selection.ShapeRange.Model3D.RotationX = 303.7414166667
and
Model3D.ThreeD.RotationY = 10
that I got from other websites but neither of those seems to work...
You didn't give a lot of background for this, but try to download the sample file from the link below and see if it helps you get going in the right direction.
http://www.mediafire.com/file/ued1rjexrd2by23/3d_Rotate.xls/file
Related
I need to write the picture into Excel. The picture is displayed in the middle of the grid (this grid may be combined by multiple grids). If the picture is larger than the grid, it needs to be scaled in the middle of the grid. Now, the problem is that the height unit read by Excel is not a pixel. After calculating the scaling, the written excel will deform the picture. Have you encountered similar problems? How to solve it?
I've noticed this issue a couple of times over the past few years, even now that I've moved from Excel 2013 to Excel 2016 and have a different computer.
I produce a scatter plot, and set the axis line colors to black. Everything thing works as expected. Then I make a change to the underlying data, and the X axis line appears in the wrong place. As shown in the image below, the X axis line appears to be equal to around 4%, rather than 0% as you would expect. (To emphasize, the black lines are not data that is being plotted, but the result of formatting the axis lines to black).
If I close and re-open Excel file, or display it on a different screen, the issue resolves! The image below is exactly the same chart (and data) as shown above, but after I moved the open workbook from my primary monitor to my secondary monitor. Now the X axis line is where you would expect it to be!
Has anyone experienced this issue before, and any idea what causes it? I find it strange that it occurs on both new and older versions of Excel, different versions of Windows, and on different machines.
Thank you very much for your time,
Steve
I know that you can fit an Image in a cell of a Google spreadsheet with =IMAGE()
as we can see here https://support.google.com/docs/answer/3093333?hl=en.
But I canĀ“t find any way to do the same with a Drawing in spite of that Google allows you to insert a Drawing in a spreadsheet.
To clarify, what I need is to fit a Drawing in a cell.
Thank you very much.
I have had the same problem in the past. The only way I could get around it was to create the drawing in Google Drawings, download it as a JPG and insert it using the =IMAGE() function.
I am using Vaadin charts from vaadin 7.7.6. When I create a chart where I have several values obtained in different dates, the chart is created correctly. Here I put an image of the obtained result where each value is a pair to be represented.
The issue comes, when I want to convert this chart to a PDF file or create a web service that returns this chart as an image to be included elsewhere.
For creating an image from the chart, I use the SVGGenerator as recommended in the documentation. In general, it works really fine and I am able to create PDFs with charts inside. But with this chart I have an issue if the X axis is using dates. Here I copy the chart after converted to SVG:
(I have removed some chart controls as the Navigation and the Range selector because are useless in an image or PDF).
At the image we can observe that now in the X axis the dates are not showed correctly. I have checked for several hours the issue, and I am pretty sure that the issue is related to the SVGConversor.
Reading the SVGConversor code, I found a withLang(String lang) method. My thought was that maybe, if I set the language, the date is showed correctly (something similar to localization). I am not able to found any documentation of the value needed to this function and therefore, I have tried some values such as en, en_EN, en-EN, English, .... But does not matter the value I put there, always this error is launched:
java.lang.RuntimeException: SVG generation failed: ReferenceError: Can't find variable: en
Still, I am not sure that the withLang(String lang) method is the solution to my issue.
The question is: How can I show the correct dates in the X axis of my chart when converted to SVG?
Seems that the solution at the end was really easy. The issue is that I have not set the xAxis type. It is not a problem when using the chart in a Vaadin view, but it is mandatory for the SVGConverter to know the axis. Then adding this line of code:
chart.getConfiguration().getxAxis().setType(AxisType.DATETIME);
Fix the issue with the SVGConverter. Now the chart is represented correctly in my PDF documents.
I have some trouble with a document when exporting it to pdf with the builtin pdf export function of excel (2010).
I've generated a graph on my worksheet, with some colored cells arround it. Visually it looks good (even if I zoom on it with the ctrl key + mouse wheel). But when exporting, the graph overlap the surrounding cells.
For example, on the image bellow, I take a screenshot of my graph in excel (at top) and in pdf (at bottom). The red part is my graph (I've colored the background of the graph object). The graph have a black border. And just on the top of the graph, I've colored the background of a cell in blue. Normally, the graph must not overlap the blue cell, because I've manually place it bellow (cut the graph, select the cell bellow the blue one, and past the graph to this emplacement).
But we can see that:
the black border overlap the blue cell (in excel and in pdf version; but it's not really my problem; I've understand that the border in excel object is at outside the object; and then overlapp surround objects/cells).
the graph (in red + the border) has not the same place in excel and in pdf, there is a big offset (it's not a resize problem, this offset is present and the left side too). The place of the graph is more on the left and more on the top in pdf version than it can be!
(I'm using this to automatically generate reports; and the result is not visually good)
Is there any way to overcome this problem?
Hmm, I can't replicate your problem, but I've had similar issues exporting Crystal Reports to PDF. Here's 2 suggestions, neither of which is perfect and I couldn't try them first (again, sorry I couldn't replicate the problem):
Add a white row with a very small height between the graph and the cell. It might even be visually more appealing than the 2 objects one on top of the other.
Make your graph's background transparent and hide the border. Maybe add some extra white space at the top of your graph. That way, they'll still overlap, but it won't be as obvious.