Spreadsheet programs are perfect for manipulating tabular data but there is often a need to convert their contents into other formats such as PDF for easy sharing, presentation or archiving of data. Converting those files by hand, particularly if there are a huge amount of them or if the conversion has to take place on a regular schedule, is an error-prone waste of valuable time and a task that cries out for automation.
Our Total Excel Converter X software is the logical tool to use when you are looking to convert XLSX to PDF via command line at scale. The program takes all the functionality users are used to from Total Excel Converter and adds an extra dimension of power by including support for server based conversion and integration into web applications via ActiveX.
Whether you are looking for a command line XLSX converter or a server XLSX converter that can be called directly from your own application, Total Excel Converter X has you covered. Here are just some of the advanced features available:
When you are looking to take advantage of the full power of a programmatic conversion solution, the last thing you want is to be interrupted by a stream of system messages.
Total Excel Converter X runs seamlessly via the command line or when integrated with your applications so you do not have to sit there monitoring it as it runs. Any error messages encountered will be logged silently to an easily readable log file where you can inspect them later at your leisure in order to troubleshoot.
We are confident that Total Excel Converter X will introduce a brand new level of programmatic power to your document conversion workflow and encourage you to take it for a test run prior to purchasing. Download your free trial copy today and discover its full range of features for yourself!
string src="C:\\test\\Source.xlsx"; string dest="C:\\test\\Dest.PDF"; ExcelConverterX Cnv = new ExcelConverterX(); Cnv.Convert(src, dest, "-c PDF -log c:\\test\\Excel.log"); MessageBox.Show("Convert complete!");
public static class Function1 { [FunctionName("Function1")] public static async TaskRun( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log) { StringBuilder sbLogs = new StringBuilder(); sbLogs.AppendLine("started..."); try { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.CreateNoWindow = true; startInfo.UseShellExecute = false; var assemblyDirectoryPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); assemblyDirectoryPath = assemblyDirectoryPath.Substring(0, assemblyDirectoryPath.Length - 4); var executablePath = $@"{assemblyDirectoryPath}\Converter\ExcelConverterX.exe"; sbLogs.AppendLine(executablePath + "..."); var msgPath = $@"{assemblyDirectoryPath}\MSG\MSG-1.xlsx"; var outPath = Path.GetTempFileName() + ".pdf"; startInfo.FileName = executablePath; if (File.Exists(outPath)) { File.Delete(outPath); } if (File.Exists(executablePath) && File.Exists(msgPath)) { sbLogs.AppendLine("files exists..."); } else sbLogs.AppendLine("EXE & MSG files NOT exists..."); startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.Arguments = $"{msgPath} {outPath}"; using (Process exeProcess = Process.Start(startInfo)) { sbLogs.AppendLine($"wait...{DateTime.Now.ToString()}"); exeProcess.WaitForExit(); sbLogs.AppendLine($"complete...{DateTime.Now.ToString()}"); } int sleepCounter = 10; while(!File.Exists(outPath) && sleepCounter > 0) { System.Threading.Thread.Sleep(1000); sbLogs.AppendLine("sleep..."); sleepCounter--; } if (File.Exists(outPath)) sbLogs.AppendLine("Conversion complete successfully."); } catch (Exception ex) { sbLogs.AppendLine(ex.ToString()); } return new OkObjectResult(sbLogs); } }
dim C Set C=CreateObject("ExcelConverter.ExcelConverterX") C.Convert "c:\test\source.xlsx", "c:\test\dest.pdf", "-cPDF -log c:\test\Excel.log" Response.Write C.ErrorMessage set C = nothing
dim C Set C=CreateObject("ExcelConverter.ExcelConverterX") Response.Clear Response.AddHeader "Content-Type", "binary/octet-stream" Rresponse.AddHeader "Content-Disposition", "attachment; filename=test.pdf" Response.BinaryWrite c.ConvertToStream("C:\www\ASP\Source.xlsx", "C:\www\ASP", "-cpdf -log c:\html.log") set C = nothing
$src="C:\\test\\test.XLS"; $dest="C:\\test\\test.CSV"; if (file_exists($dest)) unlink($dest); $c= new COM("ExcelConverter.ExcelConverterX"); $c->convert($src,$dest, "-c csv -log c:\\test\\xls.log"); if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;
require 'win32ole' c = WIN32OLE.new('ExcelConverter.ExcelConverterX') src="C:\\test\\test.xlsx"; dest="C:\\test\\test.pdf"; c.convert(src,dest, "-c PDF -log c:\\test\\Excel.log"); if not File.exist?(dest) puts c.ErrorMessage end
import win32com.client import os.path c = win32com.client.Dispatch("ExcelConverter.ExcelConverterX") src="C:\\test\\test.xlsx"; dest="C:\\test\\test.pdf"; c.convert(src, dest, "-c PDF -log c:\\test\\Excel.log"); if not os.path.exists(file_path): print(c.ErrorMessage)
uses Dialogs, Vcl.OleAuto; var c: OleVariant; begin c:=CreateOleObject('ExcelConverter.ExcelConverterX'); C.Convert('c:\test\source.xlsx', 'c:\test\dest.pdf', '-cPDF -log c:\test\Excel.log'); IF c.ErrorMessage<> Then ShowMessage(c.ErrorMessage); end;
var c = new ActiveXObject("ExcelConverter.ExcelConverterX"); c.Convert("C:\\test\\source.xlsx", "C:\\test\\dest.pdf", "-c PDF"); if (c.ErrorMessage!="") alert(c.ErrorMessage)
use Win32::OLE; my $src="C:\\test\\test.XLS"; my $dest="C:\\test\\test.CSV"; my $c = CreateObject Win32::OLE 'ExcelConverter.ExcelConverterX'; $c->convert($src,$dest, "-c csv -log c:\\test\\xls.log"); print $c->ErrorMessage if -e $dest;
Related Topics
Total Excel Converter© 2024. All rights reserved. CoolUtils File Converters