.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Converting Excel to pdf reg

Posted By: Gowthammanju     Posted Date: June 08, 2011    Points:5   Category :ASP.Net
i need to convert excel supported file format to pdf format through asp.net with c# can any one provide me solution to this problems

Responses
Author: Sasi Prabhu             
Posted Date: June 08, 2011     Points: 20   

Refer :

http://msdn.microsoft.com/en-us/library/bb407651%28v=office.12%29.aspx

http://forums.asp.net/t/1227922.aspx

http://www.codeproject.com/KB/cs/Easy_PDF_Programming.aspx

http://www.eggheadcafe.com/articles/20021012.asp

Thanks & Regards,
Sasi Prabhu.
Author: Gowthammanju             
Posted Date: June 08, 2011     Points: 20   

Ya dude i tried the above link but not yet suceeed!!!!!!

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Sasi Prabhu             
Posted Date: June 08, 2011     Points: 20   

try

http://www.eggheadcafe.com/articles/20021012.asp

Thanks & Regards,
Sasi Prabhu.
Author: Sasi Prabhu             
Posted Date: June 08, 2011     Points: 20   

Use the Library Files :

http://stackoverflow.com/questions/769246/xls-to-pdf-conversion-inside-net

Thanks & Regards,
Sasi Prabhu.
Author: Sasi Prabhu             
Posted Date: June 08, 2011     Points: 20   

Use the Library Files :

http://stackoverflow.com/questions/769246/xls-to-pdf-conversion-inside-net

Thanks & Regards,
Sasi Prabhu.
Author: Sasi Prabhu             
Posted Date: June 08, 2011     Points: 20   

Try the Article Word to Pdf :

http://www.dotnetspark.com/kb/4156-word-to-pdf-converter-asp-net.aspx

In that i use MS Word Library.
For that use can use MS Excel Library and Try.

Thanks & Regards,
Sasi Prabhu.
Author: Gowthammanju             
Posted Date: June 08, 2011     Points: 20   

Y r u just sending the same links for two 2 three times

just posted it once

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: June 08, 2011     Points: 20   

Hey i thing these url solved my problem

http://forums.asp.net/t/1512821.aspx/1

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Sasi Prabhu             
Posted Date: June 08, 2011     Points: 20   


When your Reload this page this problem will occur ya.

Thanks & Regards,
Sasi Prabhu.
Author: Gowthammanju             
Posted Date: June 08, 2011     Points: 20   

Hey i thing these url solved my problem

http://forums.asp.net/t/1512821.aspx/1

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: rs1000             
Posted Date: June 21, 2011     Points: 20   

Spire.XLS for .NET just released a hot fix which can convert files from Excel to PDF.

Hot Fix address:
http://www.e-iceblue.com/Download/download-excel-for-net-now.html

Author: Hannah             
Posted Date: September 19, 2013     Points: 20   

I have found the code from Aspose.Cells for .NET 's technical tip page section :

http://www.aspose.com/.net/excel-component.aspx

Or you can also use this API to convert the file also if you want to avoid the coding.

Below is the code:

[b] [C#][/b]



using System;
using System.IO;
usingSystem.Windows.Forms;
usingAspose.Cells;

namespace AsposeExcel2PdfConverter
{
/// <summary>
/// AsposeExcel2PdfConverter
/// Use Aspose.Cells to perform the task
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
try
{
// Uncomment the code below when you have purchased
// license for Aspose.Cells. You need to
// deploy the license in the same folder as your
// executable, alternatively you can add the license
// file as an embedded resource to your project.
// // Set license for Aspose.Cells
// Aspose.Cells.LicensecellsLicense = new
// Aspose.Cells.License();
// cellsLicense.SetLicense("Aspose.Cells.lic");

//Get the path of the Application folder.
string path = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Application.ExecutablePath), "..\\..");
//Get the template excel file path.
stringdesignerFile = path + @"\Files\PurchasingReport.xls";
//Specify the pdf file path.
stringpdfFile = path + @"\Files\PurchasingReport.pdf";
//Create a new Workbook.
//Open the template excel file which you have to
Aspose.Cells.Workbookwb = new Aspose.Cells.Workbook(designerFile);
//Save the pdf file.
wb.Save(pdfFile, SaveFormat.Pdf);

}
catch (Exception e)
{
Console.WriteLine(e.Message);
Console.ReadLine();

}
}
}
}



[b] [VB][/b]



Imports System
Imports System.IO
Imports System.Windows.Forms
Imports Aspose.Cells

'AsposeExcel2PdfConverter
'Use Aspose.Cells to perform the task
Module Module1

Sub Main()

Try

' Uncomment the code below when you have purchased license
' forAspose.Cells. You need to deploy the
' license in the same folder as your executable, alternatively
' you can add the license file as an embedded resource to your
' project.
' ' Set license for Aspose.Cells
' DimcellsLicense As Aspose.Cells.License = New
' Aspose.Cells.License()
' cellsLicense.SetLicense("Aspose.Cells.lic")

'Get the path of the Application folder.
Dim path As String = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Application.ExecutablePath), "..\")
'Get the template excel file path.
Dim designerFile As String = path + "\Files\PurchasingReport.xls"
'Specify the pdf file path.
Dim pdfFile As String = path + "\Files\PurchasingReport.pdf"
'Create a new Workbook.
'Open the template excel file which you have to convert
Dim wb As Aspose.Cells.Workbook = New Aspose.Cells.Workbook(designerFile)
'Save the pdf file.
wb.Save(pdfFile, SaveFormat.Pdf)


Catch e As Exception
Console.WriteLine(e.Message)
Console.ReadLine()

End Try

End Sub

End Module



Author: arronlee             
Posted Date: January 27, 2014     Points: 20   

You can check this PDF converter ( http://www.yiigo.com/guides/csharp/how-to-pdf-convert.shtml ) I have ever tested before to see whether it supports Excel to PDF conversion. Good luck.



Best regards,
Arron

Next Tomorrow is Another Day .
Author: caryfloric             
Posted Date: April 21, 2014     Points: 20   


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend