You must Sign In to post a response.
  • Category: ASP.NET

    Csv file to pdf file using c#.net application

    Hi,
    i am working for c#.net windows applications,
    after uploading csv file ,it should be convert into pdf file,
    can any one give code for this
  • #769386
    Hi,

    You can use Spire.XLS available on NuGet (https://www.nuget.org/packages/Spire.XLS/) to convert csv to pdf. First reference Spire.xls.dll, second use the following code to achieve csv to pdf conversion.

    Workbook workbook = new Workbook();
    //Load CSV file
    workbook.LoadFromFile(@"D:\michelle\my file\csv2xls.csv", ",", 1, 1);
    //Convert the first sheet to PDF
    Worksheet sheet = workbook.Worksheets[0];
    sheet.SaveToPdf("toPDF.pdf");

  • #769388
    Nice suggestion Micheal......


  • Sign In to post your comments