Click here to Skip to main content
12,501,105 members (40,239 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi, I have a bytes Array that i parse into a Excel File.
The problem is: How can i parse the excel file to an pdf File.

Pleas, if some one have the answer help me.
Posted 5-Nov-12 6:22am
Comments
Outeriesself 28-Aug-15 5:11am
   
Here is a rather simple way how you can accomplish converting of excel file into a pdf with C#:

byte[] excelBytes = ...
ExcelFile.Load(new MemoryStream(excelBytes), LoadOptions.XlsxDefault)
.Save("Spreadsheet.pdf", SaveOptions.PdfDefault);

The code uses an API of this C# library for excel spreadsheets.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 8

Hi,

You can open the excel file into report viewer and then can export in any format.



Hope it ll work for you.

Thanks.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 7

Hi Smily so
We are looking opensource to create pdf file from excel file. Dont do marketing with spire.
Thanks
Karthik
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 5

Using Microsoft.Office.Interop.Excel to convert XLS, XLSX into PDF or XPS.
http://excelconverter.codeplex.com/[^]
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Use iTextSharp[^] free software.

This article: Creating PDF documents with iTextSharp[^] might be helpful.

BTW: You don't need to save "bytes array" into ms Excel file and then into pdf. You can do it "directly".

The other solution is to install MS Excel Addin[^], which allows you to export and save excel files to the PDF format. You can call corresponding method to save workbook as a pdf file via COM[^].
  Permalink  
v2
Comments
   
Sure, a 5. I would also provide this link:
http://itextpdf.com/.

It's Java, but the documentation is mostly there.
--SA
Maciej Los 5-Nov-12 15:02pm
   
Thank you, Sergey ;)

And thank you for sharing a link.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
Maciej Los 5-Nov-12 13:53pm
   
Interesting links, +5!
ridoy 5-Nov-12 13:55pm
   
Thanks Maciej..:)
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
Marcus Kramer 5-Nov-12 12:41pm
   
+5. This will work well if the OP doesn't mind using a printer driver for this purpose.
Maciej Los 5-Nov-12 13:52pm
   
Agree, +5!

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100