Let the paper size fit the print area in Excel - excel

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...

Related

How to fit 40x40 Excel Table into Word without going over the margins?

I have a 40x40 Excel Table that I want to paste into Word. However, I cannot do that without going over the margins and moving to the next page. It works with bitmap but data becomes unreadable. Is there any efficient way to see a big table on one page? Thanks.

Reportlab - Truncating text after specific width while writing on canvas

I am working on a project which has a PDF editor that we have built in angular. User can drag and drop dynamic fields (user defined fields) on the PDF. These fields when are filled from a user define form, the corresponding PDF (that user has edited) gets generated in the backend. We are using Python 3.7 and Reportlab to edit and write dynamic data to the PDF.
The length of the value dynamic fields is not fixed. It can be more than the field variable's length. On PDF editor, the user decides max width of the generated dynamic text. We want to write the text till the specified width only and truncate rest of the text. For example, first_name is the variable dropped on the PDF editor. It's max width is set to 10px. If the value of the variable is "Wolfeschlegelsteinhausenbergerdorff", the text should be written till 10 px and should get truncated after that.
So far, we have managed to write the full text (irrespective of width specified). Following is the code that we are using.
........
paragraph_style.textColor = HexColor(pdf_element["font_color"])
paragraph_style.fontSize = pdf_element["font_size"]
paragraph = Paragraph(str(output_text_value), style=paragraph_style)
paragraph.drawOn(can,location_x, location_y)
........
Above code writes full text on the PDF. However, we need a way to somehow truncate the text after specified width.
Any help is greatly appreciated.
Instead of directly drawing paragraph on the canvas, use frame. Add the paragraph inside frame, Apply truncate mode to the frame and then draw frame on canvas. Your code should look like following:
frame = KeepInFrame(min_width, min_height, [paragraph], mode='truncate')
frame.width = float(min_.replace("px",""))
frame.drawOn(can, location_x, location_y)
Hope it helps. Thanks

Printing Long Spreadsheets on One Page (Excel to PDF)

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.

Excel table Page Wrap

I am trying to create a calendar in Excel for staff holidays (4 persons). But when I print the calendar it will be cut (more pages printed) and when I resize it, it will be too small to read.
So i want to change this:
To this:
This is just for printing.
Any tips would be highly appreciated.
Set the Margins to Narrow using Page Setup
Go to View - Page Break Preview.
Adjust the Blue lines so that the page doesn't cut the edges of the months but does give you a reduced number of pages
It is probably unlikely that you will get it to print on one page without it being too small. Unless you can print on to A3 paper.

IBM Cognos Cross Tab alignment

I have placed two crosstabs one below another. But They are not getting aligned. How to align the two cross tabs such that corresponding columns align perfectly.
The quick and dirty way is to use fixed widths on all cells.
This will work fine for PDF, but will not work for HTML if:
You're using a modern browser (IE9+, FF/Chrome from last 5 years)
The total width exceeds screen size
There is no total width set on the crosstab itself
It will then ignore the cell widths and try to force everything to the screen width, thus the crosstabs will not align again.
I wrote some JavaScript awhile back which will combine two tables into one so fixed width is not needed. The full blog post is here. This will only affect HTML outputs, so for PDF I created a second page and just conditionally rendered one depending on user selection.
Fixed width is the only viable solution )
But you can use Report Classes to have a single “width” definition and apply it everywhere. It actually makes your reports look way neater.
Use Blocks in the cross tab cells, you will need to unlock the report first to do this
Set the block size to be the same on both cross tabs and then select content is clipped (Size and overflow property of the block)
This will work for both html and pdf output
I was able to do this by doing the following:
Set the Size & Overflow > Width of BOTH crosstabs to the same width in pixels.
Unlock the report, select the crosstab Text items in BOTH crosstabs and set them all to the same width (or individual columns to the same width if needed).
With the report still unlocked, select the text items in the crosstab 'Rows' and set those to the same width.
It's not pretty, but nothing in Cognos ever is.

Resources