GrapeCity Forums

The GrapeCity Message Boards
Welcome to GrapeCity Forums Sign in | Join | Help
in Search

ImportExcelBook throwing error

Last post 08-25-2010, 11:07 AM by DeepakSharma. 7 replies.
Sort Posts: Previous Next
  •  07-19-2010, 4:36 PM 91146

    ImportExcelBook throwing error

    I am using Farpoint Spread control 7.0 with VB6 and am getting an error when I try to use the ImportExcelBook.  The error reads "Automation error.  The object invoked has disconnected from its clients."  I have tried running the program in the IDE and everything works correctly, but when the program is compiled the error pops up.  I have already made sure that it isn't anything simple like an incorrect path.  And I have searched through the forums and haven't been able to come anything.  Are there any reasons that this error would occur, or settings that would cause this?

  •  07-20-2010, 11:15 AM 91178 in reply to 91146

    Re: ImportExcelBook throwing error

    I found this excellent article explaining this problem and offering several possible solutions from Microsoft.

    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q319832

  •  07-29-2010, 9:37 AM 91377 in reply to 91178

    Re: ImportExcelBook throwing error

    I took a look at the link but it doesn't really seem to address the problem that I'm having.  I left some of the complexity out before because the behavior that I'm seeing isn't really easy to explain.  The program that I am modifying is a program that we have had out in the field for quite some time.  The task was to replace the workbook that we were using previously with a new one.  I did this, and only changed some string handling, and the mapping on how to interact with the new workbook.  When I compiled the code it didn't work, broke when it tried to load the file, tried to revert back to the old file that was working, broke on the load again.  Checked the code and everything seems fine.  Started making the changes one by one from the old program to the new one.  Got it to the point where everything was identical except for the comments, and it was working.  Took the comments out, and recompiled...suddenly didn't work...put the comments back in...and it didn't work.  Uninstalled our program from the machine, reinstalled and started moving over the newly complied flies.  Moved over this dll, worked fine...moved over the new report (xml file), worked fine...moved over our rules engine (doesn't have any effect on the load of our worksheet), breaks.  I can repeat these steps each time until it breaks.  The rules engine can't have anything to do with it unless its stepping on something in the registry because its not referenced by the code, doesn't affect the name or path of the book, and has no interaction with the program at all.  My point being that there is something screwing up the load that isn't the workbook itself, and I can't track it down to save my life, and I've exhausted everything I can think of.  And its not the code, because in the above mentioned scenario I can run the program over and over until I replace our rules and it works correctly.  It loads the workbook, gets the values it needs, and then closes with no problems, and will do so multiple times in a row.  So are there any issues that farpoint has with loading workbooks that could be causing this?
  •  07-30-2010, 1:51 PM 91416 in reply to 91377

    Re: ImportExcelBook throwing error

    Hello,

    Do you always get this Automation Error at "fpspread1.ImportExcelBook()" line of code?

     

    Thanks,


    Deepak Sharma
    GrapeCity FarPoint
  •  08-23-2010, 3:56 PM 91873 in reply to 91416

    Re: ImportExcelBook throwing error

    I apologize for not answering sooner, but I got shifted off to another program and it was a very high priority so I haven't been able to get back to this until now.  But yes, it is throwing the error every time.  The strange thing is that it necessarily isn't the same line that it breaks on each time.  But it works fine in the IDE, so I have no idea why it would be breaking.
  •  08-24-2010, 2:19 PM 91894 in reply to 91873

    Re: ImportExcelBook throwing error

    Hello,

    Could you please provide us the sample application to debug it further at our end?

     

    Thanks,

     


    Deepak Sharma
    GrapeCity FarPoint
  •  08-24-2010, 2:52 PM 91895 in reply to 91894

    Re: ImportExcelBook throwing error

    Unfortunately I don't think that I can because the program contains proprietary information.  To your comment above, it always breaks on the same line of code, which is the frmspread.importExcellBook(), but the log file doesn't always choke in the same place of the file.  The code looks like this:

        bOK = mospread.ImportExcelBook(sExcelFileName, _
                                                                  "D:\Logfile.txt")

    very simple call...and the output file looks like this:

    ===== FarPoint Technologies, Inc =====
    ===== Begin of Excel Workbook General Load =====
    8/24/2010 - 11:27

    Col    Row    Information
    ___    ___    ___________
            Import Excel File: D:\E20-II\MPS10\CODE\CAR_MPS_Predictor_July10.xls

    ===== End of Excel Workbook General Load =====

    ===== Begin of Excel Sheet Load =====
            Import Sheet:  -1
    0    0    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    0    0    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    22    3    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    -    -    127:Spread recognizes this format token, but does not support it. Excel token = @
    13    6    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    13    6    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    13    6    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    14    6    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    8    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    7    9    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    7    9    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    7    9    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    17    9    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    21    9    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    26    9    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
    26    9    134:Import encountered a function or formula in the Excel file; a float cell has been created in Spread.
     

    not sure what else I can give that would be of much help, but I will check to see if I can send the application and the spreadsheet that it uses.

  •  08-25-2010, 11:07 AM 91908 in reply to 91895

    Re: ImportExcelBook throwing error

    Hello,

    Could you please provide us the XLS file that you are trying to import?

     

    Thanks


    Deepak Sharma
    GrapeCity FarPoint
View as RSS news feed in XML
     FarPoint Forums Home