Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to Convert xls to pdf and Docs to pdf in Window APplication in C#
[no name] 24-Sep-13 9:40am    
You go find a library that you can use to "convert" one document type to another, or you read the specs for the documents and write a bunch of code to do this conversion.
Sergey Alexandrovich Kryukov 24-Sep-13 11:22am    
Right. And two answers already point out what's involved... :-)

Share this answer
Sergey Alexandrovich Kryukov 24-Sep-13 11:21am    
Can be useful, 5ed. Please see more link and detail in my answer.
ridoy 24-Sep-13 11:22am    
Thank you,SA.
To generate PDF, I would recommend using iText, or its .NET port, iTextSharp:[^],[^],[^].

In included the reference to Java iText site as well, because most documentation is there. If you understand C#, it would not be difficult to understand Java-bases API documentation.

For parsing Office documents, I would recommend using Open XML SDK:[^].

This way, you can support new XML-based Office formats (such as .DOCX, .XLSX), ECMA-376 standard:[^],[^].

This way, you can work without Office installed. Also, the documents are supported by 3rd-party software. Please see my past answers:
Convert Office-Documents to PDF without interop[^],
Need a rather unique WPF text editor control[^],
Hi how can i display word file in windows application using[^],
Read a word file without using Interop.word dll...Do not want to install word in IIS..[^].

This is another option:[^].

See also:;EN-US;q257757#kb2[^].

See also this CodeProject article: Creating basic Excel workbook with Open XML[^].

You can also use Office Interop, but this is less recommended, especially in server settings. By the way, see these Microsoft article on the topic:;EN-US;q257757#kb2[^],[^].

Share this answer
ridoy 24-Sep-13 11:22am    
I would say much much details than what he wants,5ed!
Sergey Alexandrovich Kryukov 24-Sep-13 11:23am    
Not sure. I point out essential things, notably, preferring Open XML SDK over Office Interop.
Thank you very much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900