Hi All,
I am pretty new to this community and LaTex itself. I have created an Excel macro that is used to collect employee info and it writes out a .tex file. what I am trying to do and not being able is to compile the .tex file by calling the latex compiler from within Excel. I am a windows user and have been using LED and/or Texnic Center
any help will be greatly appreciated.
Text Formatting ⇒ open and compile a tex document from another program
open and compile a tex document from another program
Last edited by mpaudel on Thu Feb 24, 2011 6:03 pm, edited 1 time in total.
-
- Posts: 269
- Joined: Fri Feb 05, 2010 10:15 pm
Re: open and compile a tex document from another program
Can you put up the file and also the error message. What steps are you using to try to compile the file?
I have never heard of excel being able to compile a latex file. I know you can save excel files as .csv and use them in some packages (pstricks).
Nick
I have never heard of excel being able to compile a latex file. I know you can save excel files as .csv and use them in some packages (pstricks).
Nick
Re: open and compile a tex document from another program
Nick,
Thanks for your reply. I am not compiling the .tex file with Excel
in fact I am using Excel to create the .tex file (by writing out the data in the spreadsheets to a text file... properly formatted and ready to use in LaTex).
I can open .tex compilers such as LED or Texnic center manually and compile the file I write out but I am trying to open the compilers using Excel macro and have it compiled automatically os that the whole process can be automated.
Hope I am making more sense here
Thanks for your reply. I am not compiling the .tex file with Excel

I can open .tex compilers such as LED or Texnic center manually and compile the file I write out but I am trying to open the compilers using Excel macro and have it compiled automatically os that the whole process can be automated.
Hope I am making more sense here

- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Re: open and compile a tex document from another program
So this seems to be more an issue with Excel than with LaTeX. If so, you are not in the right forum and should ask this question elsewhere.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
open and compile a tex document from another program
Hi there!
Problem with Excel than with LaTex... well Yes and No. I used Excel to get the .tex file written out. Then I tried running LaTex compiler from within Excel. So, I would say it is a kind of combined problem.
But I got it figured out. This is what I did:
- Write the .tex file (properly formatted from Excel)
- Called a batch file pdfLaTex.bat from Excel using "Shell" as follows:
This command actually worked just like that!!!!!! Opens the batch file, compiles my .tex and generates a pdf!
Problem with Excel than with LaTex... well Yes and No. I used Excel to get the .tex file written out. Then I tried running LaTex compiler from within Excel. So, I would say it is a kind of combined problem.
But I got it figured out. This is what I did:
- Write the .tex file (properly formatted from Excel)
- Called a batch file pdfLaTex.bat from Excel using "Shell" as follows:
Code: Select all
program = pdflatexbatfile & " " & directory & " " & texfilename
TaskID = Shell(program, 1)
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
open and compile a tex document from another program
I don't think so. The generated source file compiles smoothly. The only problem is to call a LaTeX compiler from within Excel. So, clearly not a LaTeX problem.mpaudel wrote:[…] Problem with Excel than with LaTex... well Yes and No. I used Excel to get the .tex file written out. Then I tried running LaTex compiler from within Excel. So, I would say it is a kind of combined problem. […]
Nevertheless, if the problem is solved with that, please mark the topic (not the last post) accordingly.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
open and compile a tex document from another program
@mpaudel: I'm glad you found a solution since I'm trying to do the same.
However, could you please let me know, how you write into a .tex file in the first place
Plus please explain the Dim of the variables used since I'm not sure what `pdflatexbatfile` should be declared as (as well as program)
However, could you please let me know, how you write into a .tex file in the first place
Plus please explain the Dim of the variables used since I'm not sure what `pdflatexbatfile` should be declared as (as well as program)