I want to save my view result in web to excel and or PDF. I must show dialog save to make path and choose the file's extension to make file. I use asp.net, Could you help me how to do this?
for pdf use this library wkhtmltopdf
for excel use Microsoft.Office.Interop.Excel;
if you problem with this library ask me.
Related
Does ClosedXML have any function that can be used to save an excel file as PDF?
Currently i am using ClosedXML to create and populate the excel file and then using Interop to save as PDF.
But since Interop depends on the MS Office installed on the syatem the formatting changes on every version of MS Office. And since ClosedXML doesnt require having MS office installed it would be nice to be able to export or save as PDF directly from it without using Interops.
Does ClosedXML have any function that can be used to save an excel file as PDF?
No.
Instead you can use the free version of GemBox.Spreadsheet.
Also look at the top 10 libraries which allows us to manipulate excel.
However GemBox was the only free and featured one that I found with the purpose of creating an invoice report for a website, by converting excel to pdf.
you can use the ClosedXML.Excel and iTextSharp to convert Excel to PDF file.
Here a link with example:
Convert Excel file to Pdf in ASP.Net
i have a problem, i need to show a group of excel files in some views of an mvc4 project. The real problem is that the files are Excel PowerPivot and they can not be shown as images or pdf, it has to be Excel files.
Any ideas?
Thanks for the help...
If you can open the workbook in the Browser-based version of excel and see what you need to display, you can then use the Share->Embed feature of the Excel online app to generate HTML or JavaScript embed code.
If you need to have the end user manipulate the workbook to retrieve the necessary data from the PowerPivot table, then they'd most likely be better off downloading the workbook and going from that.
If they don't need to manipulate anything, look into if you can export the workbook to HTML in some fashion and embed that.
Hopefully that might put you down the right track.
How to view excel file in ASP.Net page using c#?
I need to view excel file in asp.net form and access the all excel functionality in this excel sheet.
Note:
Excel sheet will open inside the form tag, it means open within a page, not open separate file.
Like: Update fields, Merge fields, Wrap cells, Format the fields and apply text color. whatever Excel sheet have functionality all will be work asp.net excel page.
Thanks in Advance.
You can upload this file to Google Doc and open it then chose File -> Publish to the Web -> Get html code and paste them.
Good luck.
I have a csv file and I need to make a pdf copy in the console application that creates the csv. All I have found 3rd party libraries for working with pdf but I don't want to use that. Can I just make a copy and save it as a pdf? If so, how?
Also, I'm using C#, in case you didn't read the title.
Try the below link hope it will help you.
http://sourceforge.net/project/platformdownload.php?group_id=72954
You can open the csv with excel.
than use office PIA (interop) to save as PDF.
see:
Can I use Microsoft Office 2010: Primary Interop Assemblies to convert word,excel to PDF
first read the csv files using c# code, and load that data's into DataTable,
write the datatable values into pdf file using c#
may this idea will help 4 u
I have an ics file. I want to convert it to pdf format programatically using c#. Can you please tell me how can i do that programatically. Do i need to use any dll for that?
If you don't want to approach the ics file as a flat file (as flat text), you can use something like DDay.iCal to get to the data through an Object Model. From there on, you'd use e.g. iTextSharp to create your pdf.
You will need a pdf conversion library. There are several available, some paid, some free.
Here'a an example of a free one: http://www.pdfsharp.com/PDFsharp/
You can work with .ics file like with simple text file. So you can use any library which allow to create pdf.
I use itextsharp. You can download it here: http://sourceforge.net/projects/itextsharp/
You can use the NET library Aspose.iCal to parse the ICS file
http://www.aspose.com/community/blogs/salman.sarfraz/archive/2008/11/21/where-is-aspose-icalendar.aspx (used to be http://www.aspose.com/categories/file-format-components/aspose.network-for-.net/default.aspx)
And the using iTextSharp at http://sourceforge.net/projects/itextsharp/ or similar software create the PDF.