ExcelWarning object

Posted by: judir on 8 September 2017, 1:14 pm EST

  • Posted 8 September 2017, 1:14 pm EST

    I am opening an Excel file and using the form that takes a filename and WarningList.


    Fp1.OpenExcel("C:\esp2008\Prototype\JR\FPFromXLS\FPFromXLS\XLS\" & sFName & ".xls", myWarnings)


    I get a warning on a sheet that I don't understand and cannot seem to find any documentation of the ExcelWarning and ExcelWarningList objects.  (I am using version 2.5.2010.2005 Spread for Windows Forms).


    Dim aWarn As FarPoint.Excel.ExcelWarning


    For Each aWarn In myWarnings.WarningList


    txtStatus.Text &= vbCrLf & aWarn.Code.ToString & " " & aWarn.Message.ToString & " at " & Fp1.Sheets(aWarn.Sheet).SheetName & " Row: " & aWarn.Row.ToString & " Col: " & aWarn.Column.ToString


    Next


    produces this


    FormulaErrorNotifyFarPoint Unsupported ptg found: ag at sheet1 Row: 15 Col: 2


    I'm attaching the file.  Please help me understand why this is producing this warning and what this warning means; and I would really like to know where to find information on this type of object.


    thanks


    2008/05/FPWarn.zip
  • Replied 8 September 2017, 1:14 pm EST

    Scott


    Thanks for the advice.  I installed ver4 (4.0.2003.2005) and am now trying to open the large xls (29 sheets minus the 1 problem sheet that I sent you), but now I throw an exception and nothing is available. This is the exception:


    A first chance exception of type 'System.ArgumentException' occurred in FarPoint.Win.Spread.dll


    System.ArgumentException: Value does not fall within the expected range.


    at c9.a(String A_0, Stream A_1, Int32 A_2, String A_3, Int32 A_4, String A_5, ExcelOpenFlags A_6, ExcelWarningList A_7)


    at FarPoint.Win.Spread.FpSpread.a(Stream A_0, Int32 A_1, String A_2, Int32 A_3, String A_4, ExcelOpenFlags A_5, ExcelWarningList A_6)


    at FarPoint.Win.Spread.FpSpread.OpenExcel(Stream stream, ExcelWarningList warningList)


    at FPFromXLS.Form1.cmdOpenInSQLExpress_Click(Object sender, EventArgs e) in C:\esp2008\Prototype\JR\FPFromXLS\FPFromXLS\Form1.vb:line 327


    The code at line 327 is    


    Fp1.OpenExcel(fs2, myWarnings)  


    With ver 2.5 this same file from a BLOB was opening fine, and as long as I left the sheet out that had the warning it opened with no warnings generated.


    Please advise as to how I should approach these large files to be able to load them.  At least ver 2.5 did that and let me know there was a problem.

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    Could you post the Excel file you are trying to open for us to debug the new issue you are seeing?

  • Replied 8 September 2017, 1:14 pm EST

    Scott I will try to send a file that has this problem but need to remove all proprietary content first, so it may take me a day or so.  In the meantime I was going to try version 3; how long will that version be supported?

  • Replied 8 September 2017, 1:14 pm EST

    Scott, I think I found what is causing the exception; it looks like some remnants of what I believe were old style Excel macros.  Ver 2.5 just seems to ignore them, but ver 4.0 cannot recover.  I isolated the sheet and actually removed some rows and columns that had proprietary sheet names referenced, but with just a few remnants the OpenExcel method is aborted.  I added the other sheet that had the warning and the resulting file will open with Ver2.5 but not with ver 4.0 (4.0.2003.2005).  This is the exception


    System.ArgumentException: Value does not fall within the expected range.


    at c9.a(String A_0, Stream A_1, Int32 A_2, String A_3, Int32 A_4, String A_5, ExcelOpenFlags A_6, ExcelWarningList A_7)


    at FarPoint.Win.Spread.FpSpread.a(Stream A_0, Int32 A_1, String A_2, Int32 A_3, String A_4, ExcelOpenFlags A_5, ExcelWarningList A_6)


    at FarPoint.Win.Spread.FpSpread.OpenExcel(Stream stream, ExcelOpenFlags openFlags, ExcelWarningList warningList)


    at FP_Ver4_FromXLS.frmVer4.cmdOpenBLOB_Click(Object sender, EventArgs e) in C:\esp2008\Prototype\JR\FP_Ver4_FromXLS\FP_Ver4_FromXLS\frmVer4.vb:line 297


    yet in ver 2.5 it can open and sees that there is a problem at Row 15 Col 2.


    If I open just the sheet with the problem in ver 4.0, it only shows "#NAME?" in the cell. 


    Is there a way to save the initial formula? It was "=ROUND(IF(AND(C14>0,C11>0),C14/C11,0),3)"


    Thanks for the help, by removing these rements of old macros I can load my entire file, but I still would like to know where there were items that could not be expressed, like row 15 col 2 in my example.


     


    2008/05/T6_ver4.zip
  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    The first issue I am able to reproduce and have reported this as a bug (#22514) for the development team to fix for the next maintenance release. The other issue, I reported as a bug (#22496) the other day.

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    I tested this with the latest version of Spread (version 4) and I do not get any warnings, but the formula in this cell does not load correctly, so I reported this as a bug in Spread. However, we are not doing any more maintenance releases of Spread for Windows Forms version 2.5. It will be fixed in the next release of version 4.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels