Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Export Excel Workbook to .PDF
Message
De
13/01/2018 14:16:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Export Excel Workbook to .PDF
Divers
Thread ID:
01657177
Message ID:
01657177
Vues:
62
            string xlsfilename = ConfigurationManager.AppSettings["XLSFilesPath"] + "ps20180113.xls";
            string pdffilename = ConfigurationManager.AppSettings["PDFFilesPath"] + "testps20180113.pdf";

            Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application();
            Microsoft.Office.Interop.Excel.Workbook wbv = excel.Workbooks.Open(xlsfilename);
            Microsoft.Office.Interop.Excel.Worksheet wx = excel.ActiveSheet as Microsoft.Office.Interop.Excel.Worksheet;
            if (File.Exists(pdffilename))
            {
                File.Delete(pdffilename);
            }

            wbv.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, pdffilename);

       
            wbv.Close(true, Type.Missing, Type.Missing);
            excel.Quit();
The above C# code creates a .pdf from an Excel Worksheet
I can't find the equivalent code to do it with VFP

Any ideas?
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform