Hi all,
I am creating tables and charts in Excel and then I want to convert
them into EPS or PDF (one chart/table per pdf file) so I could use
them in Latex. It is also a means of maintaining tables/charts without
losing quality. Any fast convenient way of doing so?
Any thoughts?
Thank you!
"Print" them to a file using a postscript or PDF driver. On a Mac
this is as simple as choosing "Print" and then clicking on the
"Save to PDF" button. On a PC you'll need to... well, this page
has all the details---
http://www.freeopenbook.com/pdf-hacks/pdfhks-CHP-4-SECT-9.html
I did this for my WinXP setup and it works wonderfully.
I'd also "print", but I use BullZip:
which is easier to install and use.
--
Joseph Wright
Have Excel itself save them as PDF (this functionality is certainly
available for Excel 2007 in the "Save As..." menu, but, as far as
I remember, it must be installed / enabled separately).
Regards,
Christian
this is bad because when you print to pdf the one table is splitted to
several pages and cropped.
I suddenly feel a need to clarify your question, Luna.
1. Are your Excel tables pretty much simple data in cells, one cell to
each row and columns?
Or do some cells span more than one row and column.
2. Do you have formatting you wish to preserve - bold, italics,
and so on.
3. Do you have row or Cell border-lines you wish to preserve ?
The answers to these questions may not only alter the difficulty
of the task, but also affect whether LaTeX is an appropriate
solution at all.
Cheers,
Ken.
Sure, my tables and charts in Excel have lots of decorations and
patterns and colors that we don't want to lose.
Probably the easiest is to Save As pdf, but I hope it has a tight
bounding box. I just need to convert a selection of table/chart into
PDF, not the whole document or the whole sheet. Without a tight
bounding box, how can I use it in Latex?
No, I tried both Print (in 2003) and SaveAs (in 2007) to PDF. But they
don't have a tight bounding box for using in Latex. And the SAVEAS in
2007 does not save selections, only save the whole active sheet.
It's automatically there in my 2007. But it doesn't have a tight
bounding box.
As others suggested, print it to a postscript file, using
extension .ps. Then, open it in GSview and use "PS to EPS" to tighten
the bounding box and save it as .eps.
Yes, I would agree. There is a slight difference between 'save as PDF'
and 'Print to PDF' which you might need to investigate.
It all comes down to the quality of the driver. I have the
luxury of acrobat professional on my machine, and the results
of 'Print to PDF' are excellent. You would first select your table and use:
menubar -->file --> set Print Area -->
This gives a PDF the correct size, and restricted to the selected area.
(You can use print preview before preesing the print button if
you like)
As for your other problem, of a table being split over two pages, a
good driver allows you to set an arbitrary pages size for the
final PDF, so a bit of experimentation is all you need.
What you won't have, with this method, is matching font style and size
with the fonts in the remainder of your document.
I forgot to mention that you may wish to press the document
Properties button in your PDF Printer box, where you can set up
a custom pages size, or a few.
If you tables are a large variety of sizes, you would
possibly be better off cropping them one at
a time after converstion to PDF.
I'll give you easier to install ("run the install program" vs. "follow
this list
of steps involving several packages") but how is it easier to use? I
just hit "print" and type in a file name. I assume you do, too.
Huh?! This is only true if the table would have been split across
several pages and cropped in hardcopy, too. That can be fixed
by adjusting the print preferences in Excel.
Of course, I haven't tested whether or not the output from a PDF
print under windows gives you a "page" or a "graphic" like an
encapsulated-PDF.
This is to troublesome - I have many such tables and charts.
Could you please clearly list the steps to make PDF with tight
bounding box and no splitting across pages and fit every table each
into one page, (I mean, my Excel tables/charts were designed to be
inserted into a typical report which is readable on Letter size paper.
The width and height are very reasonable. )
How to do that?
I can't speak for every 'PDF printer', but I can tell you
how to use the one I have, the one that came with Acrobat
Professional. I can't say whether Open-source
PDF printers have a similar interface or not.
Firstly you need to establish the maximum size of graphic
that will actually be acceptable to your final document,
if imported.
for the purposes of the following, I found that
Letter paper with a one-tenth of an inch margin would
accept a pdf of 8 x 10.5 inches.
I therefore decided that I would crop the Table printout
to this size at maximum, possibly not completely
as a 'tight' bounding box in method one.
##############################################
This method was tested, after saving an excel table as
'Workinghours.pdf' with the following minimal LateX
document:
\documentclass{article}
\usepackage{geometry}
\geometry{letterpaper, portrait, top=0.1in, bottom=0.1in, left=0.1in,
right=0.1in}
\usepackage[pdftex]{graphicx}
\begin{document}
\includegraphics{HoursofWork} % pdf image of 8 x 10.5 inches
\end{document}
###############################################
Method one: I set up three custom page sizes in my PDF
printer, as follows:
Sub_Letter: 8 x 10.5 inches
Halfsub_Letter 8 x 5.0 inches
QuarterSub_Letter 8 x 2,5 inches
(You can make as many as you wish)
How? get to the printer dialogue box e.g.
1. Control panel --> Printers and faxes -->
2. Right Click on 'Adobe PDF', choose 'Printing preferences ...'
3. Use the TAB 'Adobe pDF settings'
4. Go to the 'Adobe PDF Page Size' drop-down list, and click the
'Add...' button next to it.
5a. Fill in the form for your custom pages size:
Paper Names : Sub_Letter
Units : Inch
Width: 8.0
Height: 10.5
Press the Add/modify button when you are finished.
5b, 5c, etc: repeat for other custom sizes you want.
#######################################
Back in Excel.
1. Select the table you want.
Menubar --> Print area --> Set Print Area
2. Menubar --> File --> Page setup ... Page TAB
Orientation. Portrait
Adjust to: 100 %normal size
Paper size: Sub_Letter
3. (Optional) Menubar --> File --> Print Preview (Esc)
4. Menubar --> File --> Print
###############################################################
Method Two. Print to whatever size PDF, and crop afterwards.
Someone else has already mentioned the open-source Ghostscript method.
I don't know how similar the functionality might be, but the user
interface is likely to be very different.
This is what you would do in acrobat professional.
Menubar --> Tools --> Advanced editing --> crop tool ...
interactive crop by click and drag...
when done, double-click to get a dialogue box for
precision final choices.
You also get a 'remove white margins' option as an alternative
to the click and drag method.
Luna Moon wrote:
> > As others suggested, print it to a postscript file, using
> > extension .ps. Then, open it in GSview and use "PS to EPS" to
> > tighten the bounding box and save it as .eps.
>
> This is to troublesome - I have many such tables and charts.
It's just a GUI for Ghostscript: You can also use the »ps2eps« CLI
script.
For calculating a new Bounding Box: »ps2eps -C -B graphic.ps«
-hwh
> On Aug 27, 11:27 am, Martin Chicoine <martin.chico...@gmail.com>
> wrote:
>> On 26 aoūt, 08:09, Luna Moon <lunamoonm...@gmail.com> wrote:
>>
>>> how to convert Excel tables/charts into EPS or PDF?
Write a custom report that inserts LaTeX markup, and process
with pdflatex.
>>> Hi all,
>>
>>> I am creating tables and charts in Excel and then I want to convert
>>> them into EPS or PDF (one chart/table per pdf file) so I could use
>>> them in Latex. It is also a means of maintaining tables/charts without
>>> losing quality. Any fast convenient way of doing so?
>>
>>> Any thoughts?
>>
>>> Thank you!
>>
>> As others suggested, print it to a postscript file, using
>> extension .ps. Then, open it in GSview and use "PS to EPS" to tighten
>> the bounding box and save it as .eps.
Many latex distributions include utilities to crop PDF files.
> This is to troublesome - I have many such tables and charts.
Back when troff with tbl (a tool to create tables using a high-level
markup that was translated to low-level troff codes) were more common
than tex, I used a report package to insert the tbl markup. The
report package required a number of lines per page, which I set
to 999, but I had to edit the files to remove the page breaks
and extra table heads.
--
George White <aa...@chebucto.ns.ca> <gn...@acm.org>
189 Parklea Dr., Head of St. Margarets Bay, Nova Scotia B3Z 2G6