I have a time based chart and I am trying to print it on one pdf page. The chart spreads from column 'B' to 'UR' ~ 560 columns. I have the print setup for that area and to fit one page. It prints till column JU and disregards the rest. Not sure if there is a work around or if I am missing something. And if there is a vba script that can help with it.
I tried some additional variations and did experience the cut off issue. I couldn't quickly work out what created the limit, but it wasn't the number of columns; a guess is there is a limit to the size of the hidden "canvas" on which the chart is painted before its scaled back to print and/or save as PDF ... hence is related to the width of the chart. However you can see (roughly) from the screen shots below a chart spanning from B to UR (limited by yellow in column UR); the chart is 319cm wide. Then the saved PDF. The page setup was A4 landscape with narrow margins. Cheers.
Related
I know how tricky it is to align things in a way that allows a clean export to excel, however, on this one I am stumped and have never seen it before.
Anyone know why the excel rendering extension insists on inserting a column like in the attached image?
Things that I have tried.
Set the table's position to 0,0.
Removed all borders and padding.
Set the report margins to 0,0,0,0
NOTE : I am using the EXCELOPENXML rendering format as opposed to EXCEL in order to support *.xlxs.
Groupings:
First Column in the Designer:
The report was being rendered as a sub report and was placed in a rectangle and aligned right in the main report, however, the rectangle was one twip off from left align. Once I aligned the rectangle in the main report, the phantom column disappeared.
I am trying to determine the visible worksheet area in points. So far, I have tried the Application.Width, but that gives me the entire area including the scroll bars, and likewise Application.Height includes the ribbon and horizontal scroll bar. What I need specifically is the size of only this viewable worksheet area.
Something I have tried so far is looking at the visible range. For example, if I can see A1 thru AA40, then I can use the code
Debug.Print ws.Range("A1:AA40").Width
Debug.Print ws.Range("A1:AA40").Height
The only problem with this is if I can see half of column AB and half of row 41, then I don't have the full size. Also, it is not adjustable if I decide to change the application window size to half the screen.
I have no need for converting into the number of pixels, I just need the point sizes. Does anyone know a way to get the visible area size, or at the very least how to resize a range to fit only this visible area?
You can access the Windows collection of Application and use the Width and Height properties of items of that collection. E.g.
Debug.Print Application.Windows(1).Width
Debug.Print Application.Windows(1).Height
You can also refer to ActiveWindow and get the properties from that as well.
Example:
Grid's dimensions:
?Activewindow.activepane.VisibleRange.Height, Activewindow.activepane.VisibleRange.Width
The above worked for me, returning the dimensions of only Excel's grid which could be seen on my screen- no scrollbars, no Ribbon, no formula bar - just cells displayed.
I'm looking to set up a scroll bar in Excel that corresponds to what set of data I use for a chart. I have built a 2-value doughnut chart that acts as a percentage gauge (green section is completed and grey is 100% minus the completed part).
I want to be able to choose what month's data I use for this chart using the scroll bar. All I can seem to find online is how to modify the number of rows and columns that are displayed on a graph rather than actually using the scroller to pick what data to display.
In addition, how would I make it default to the current month? Any help would be appreciated!
For anyone that is looking for a similar solution, I have figured it out. It works with something called a dynamic range. Use the value of the scrollbar to determine the offset of rows (pick which row of data to use). Then link that dynamic range to your chart in place of where you would select the data.
I have an Excel 2010 chart, with several series. I have added data labels to one of the series. I want to change the font size of all labels of that series at once. Can it be done?
Note that if the contents of data labels are combinations of the three standard options in the Format Data Labels dialog ("Series Name", "X Value", or "Y Value"), I simply change the font size in the ribbon and it works.
But if data labels contain cell references (i.e., formulas), I could only change the font size of one label at a time.
I guess a macro would help. I tried something a while ago, and faced a sequence of problems (do not remember exactly which).
Anyone knows of a shorter/alternative solution?
It appears I found the cause.
Referring to the figure, whenever any of the cells referred to by the data labels is empty (e.g., deleting the contents of D4), I cannot change the font size.
If I reinstate D4, I can change the font size again. This is reproducible for the simple worksheet/chart of the figure.
According to this,
Workaround 1: Fill up all empty cells referred to. Change the format of labels. Remove added contents.
Workaround 2: Change to a dummy range for the data labels, which has no empty cells. Change the format of labels. Switch back to your intended range.
This might require The XY Chart Labeler, an excellent add-in by Rob Bovey.
This does not always work (there are cases where one cannot change font even with all non-empty cells), so there should be another possible cause for the problem (besides the one reported).
A workaround:
For the workbook, Save As... (you can even use the same workbook name). The problem goes away.
But if you close the file and open it again, the problem reappears.
Most of the times it works.
A workaround (found prior to #1):
A very poor solution, but which possibly saves quite a few keystrokes/mouse clicks in many cases. Select the whole chart, and change the font size in the ribbon. It will change all text. Then recover the font size of all other text but the data labels.
It won't work in charts with more than one series with such data labels, if you want them to have different sizes!
A quick way to solve this is to:
Go to the chart and left mouse click on the 'data series' you want to edit.
Click anywhere in formula bar above. Don't change anything.
Click the 'tick icon' just to the left of the formula bar.
Go straight back to the same data series and right mouse click, and choose add data labels
This has worked in Excel 2016. Purely by luck I worked this out saving a great deal of time and frustration.
I wrote a 10*5 table in MS Excel 2010. Then I intended to print this table to a PDF file.
By default, it would print this table on a regular page, say Letter(8.5*11). This gives a printed paper with most area are blank.
Can I print this table to a PDF file with minimal blank space?
In another word, let the paper size fit the print area?
If that option did exist, the text would be very large since you effectively just zoomed in..
I recommend looking at your table in Page Layout view (goto View->Page Layout) and fiddling with the table's rows and columns until it takes up the entire space.
Yes you can by setting the normal print area to the area ytou want in the pdf and set the print margin settings to minimal and the Page setting to Fit to x by y pages.
If that would still leave you with emptiness on your pdf page your area is just to tiny. Increase its size by increasing the Text size inside that area until you see in the PDF save that you fill up the complete area.
Unfortunately there doesnt seem to be a single magic setting for this. You will have to find the size of the "paper" and that of your text yourself...