开发者

Issue with Excel into Word then export to PDF

I am currently with a problem. I am creating a reporting system in C#. It uses Excel and Word. The system generates a Word document and then imports the Excel document into the Word document.

The problem is as follows: If I have a Word document with red text export to PDF I get the neat red. Same with a standard Excel export.

But! I want do do this:

  • Make a Excel document with (for example) red text

  • Import the Excel document in Word

  • Export the Word document to a PDF

So the million dollar question is:

How can i keep the coloured text from excel开发者_如何学Python when i export my Word to PDF ! :-D

I really appriciate any help! And i might throw in a bounty if the question stays open for a while.

Note: The color is still good when i import the Excel into Word.

Edit: I use the Office 2010 for generating the report

Edit2:

Issue with Excel into Word then export to PDF


You can download a trial version of Aspose.Words.

That will handle the creation of Word documents and output to PDF, and in my experience it's a really good tool.


Can you tell us what you're trying to do with Excel that it has to be created with Excel first then moved into Word and then moved into PDF ? Sounds like it's really something you may want to look at first.

Check DocX for creating Word document directly (creating tables, making nice layouts etc). And then just convert it to PDF. It's easy and nicely done. It's also server-safe.

Unless there's very specific need to create Excel first I would avoid it.


Programmer XP,

I am not sure why the "MS Word" section is in your workflow. You start with Excel and want a PDF, why not use a PDF creator. I have used various free PDF creators in macro's to convert (sections) of a spreadsheet into PDF's by "printing" to the PDF service.

Check out: http://sourceforge.net/projects/pdfcreator/

This way you can skip the "MS Word" part, unless you are adding/combining the excel spreadsheet to an existing document.

Regards,

Robert Ilbrink

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜