This project has moved and is read-only. For the latest updates, please go here.

Microsoft Excel has stopped working

Oct 6, 2016 at 12:20 PM
Hi, first of all thank you for this great software.

I am using OfficeToPDF to convert some Excels to PDF and it works good but when I try to use it in large Excels (output 30 pages for example), I get this message. Also I have got this message in 1 sheet workbooks that are a bit big in horizontal (don't really know how to explain it :S).

Is this a known issue or there is something I can do to fix that?

Thanks!
Oct 6, 2016 at 3:04 PM
Edited Oct 6, 2016 at 3:04 PM
Hi @Cristianslei

Unfortunately, codeplex is not showing the message you referred to in your question, so I don't know what you're seeing.

Excel can be slow and does seem to have problems with worksheets that have many rows. This is why we have the /excel_max_rows option for skipping conversion on worksheets that have a large number of rows.

Could you let me know a bit more about your system:
  • What version of Excel you're running
  • What type of file you're converting (xls, xlt, xlsx, xlsm, xlsb, etc.)
  • What the message you were seeing was
  • How many rows and columns in your worksheets
  • Whether your workbook contains charts
  • Whether your workbook contains macros
Bizarrely enough, the speed of Excel conversion may be affected by your default printer setting, so you could see if changing your default printer has any effect.

Regards
Vittal
Oct 7, 2016 at 8:05 AM
Hi,
  • I'm running Excel 2016
  • Trying to convert both, xls and xlsx files
  • Error I see: Image (http://imgur.com/a/uxAAj)
    Translation to English: The program has stopped working correctly for a problem. Windows will close the program and wll notify if there is a solution.
  • 61 rows, 20 columns
  • It doesn't have charts nor macros but It has lot of formulas.
Also I saw this message in the cmd (translated from Spanish):

"Exception not controlled: System.Runtime.InteropServices.COMException: Error in the call to a remote process. (Exception of HRESULT: 0x800706BE) in Microsoft.Office.Interop.Excel.ApplicationClass.Quit() in OfficeToPDF.ExcelConverter.Convert(String inputFile, String outputFile, Hashtable options) in OfficeToPDF.Program.Main(String[] args)"

Even with this problem, OfficeToPDF is able to create the PDF and everything is correct anyway.

Regards,
Cristian.
Oct 7, 2016 at 10:22 AM
Hi Christian

Try this version https://www.dropbox.com/s/n3wvha935g99hke/OfficeToPDF.exe?dl=1 and see if it work with or without the new /excel_no_recalculate option.

Can you also confirm how you're running OfficeToPDF. Are you running it from the command prompt or as a service (e.g. through ASP.net)?

Regards
Vittal
Oct 7, 2016 at 10:36 AM
I still get the same error with this new option.

I am running OfficeToPDF from the CMD and my plan is to use it through Java. I have got this error in CMD and also when using it in Java (actually it uses the same command through runtime, so probably it's the same than running in CMD).

Regards
Cristian.
Oct 7, 2016 at 2:53 PM
Hi Christian

To try and replicate this, we'll need to see an example of the spreadsheet.

If you can email a copy to opensource@cognidox.com or raise an issue here with one as an attachment we could take a look.

Regards
Vittal
Oct 10, 2016 at 4:13 PM
Hi Cristian

Thanks for the example file.

We've confirmed the same behaviour here when using Office 2016.

Unfortunately it is likely to take us a while to determine why it is behaving as it is.

One thing you might want to consider is using LibreOffice (http://www.libreoffice.org/) to convert the documents. LibreOffice has a "--convert-to" command line option.

e.g.
soffice.exe --convert-to pdf myspreadsheet.xls
If you're automating conversion, it can be a bit more robust than using Office's interop (as OfficeToPDF does), because you don't run the risk of Excel dialogs blocking things.

Regards
Vittal
Oct 10, 2016 at 6:19 PM
Hi Christian

We think we've traced the problem down. Try the version here:

https://www.dropbox.com/s/n3wvha935g99hke/OfficeToPDF.exe?dl=1

Regards
Vittal
Marked as answer by cognidox on 10/11/2016 at 5:20 AM
Oct 11, 2016 at 7:55 AM
Hi cognidox,

I tried the new version and it works wonderfully!

Thank you very much for your time and your help, is there anything I could do to help you guys?

Regards,
Cristian
Oct 11, 2016 at 1:26 PM
Hi Christian

Glad to know it's working for you. All these changes will be included in the next official release.

If you want, a rating and review on the Codeplex site is always welcome and a tweet to @Cognidox keeps us happy :)

Regards
Vittal